]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
authorTom Rini <trini@konsulko.com>
Wed, 13 Dec 2017 22:58:46 +0000 (17:58 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 13 Dec 2017 22:58:46 +0000 (17:58 -0500)
279 files changed:
MAINTAINERS
README
arch/arc/include/asm/arcregs.h
arch/arc/include/asm/gpio.h [new file with mode: 0644]
arch/arc/lib/cache.c
arch/arm/Kconfig
arch/arm/cpu/armv7/ls102xa/Kconfig
arch/arm/cpu/armv8/fsl-layerscape/Kconfig
arch/arm/dts/Makefile
arch/arm/dts/exynos4.dtsi
arch/arm/dts/exynos4210.dtsi
arch/arm/dts/exynos4412-odroid.dts
arch/arm/dts/exynos4412-trats2.dts
arch/arm/dts/exynos4412.dtsi
arch/arm/dts/exynos4x12.dtsi
arch/arm/dts/r8a77970-eagle.dts [new file with mode: 0644]
arch/arm/dts/r8a77970.dtsi [new file with mode: 0644]
arch/arm/dts/r8a77995-draak.dts [new file with mode: 0644]
arch/arm/dts/r8a77995.dtsi [new file with mode: 0644]
arch/arm/include/asm/arch-ls102xa/config.h
arch/arm/include/asm/arch-pxa/hardware.h
arch/arm/mach-kirkwood/include/mach/config.h
arch/arm/mach-rmobile/Kconfig.64
arch/arm/mach-rmobile/cpu_info.c
arch/arm/mach-rmobile/include/mach/rmobile.h
arch/arm/mach-rmobile/memmap-gen3.c
arch/arm/mach-uniphier/clk/Makefile
arch/arm/mach-uniphier/clk/pll-base-ld20.c
arch/powerpc/cpu/mpc83xx/Kconfig
arch/powerpc/cpu/mpc85xx/Kconfig
arch/x86/cpu/baytrail/Kconfig
arch/x86/cpu/braswell/Kconfig
arch/x86/cpu/broadwell/Kconfig
arch/x86/cpu/coreboot/Kconfig
arch/x86/cpu/ivybridge/Kconfig
arch/x86/cpu/qemu/Kconfig
arch/x86/cpu/queensbay/Kconfig
board/logicpd/omap3som/README
board/logicpd/omap3som/omap3logic.c
board/renesas/draak/Kconfig [new file with mode: 0644]
board/renesas/draak/MAINTAINERS [new file with mode: 0644]
board/renesas/draak/Makefile [new file with mode: 0644]
board/renesas/draak/draak.c [new file with mode: 0644]
board/renesas/eagle/Kconfig [new file with mode: 0644]
board/renesas/eagle/MAINTAINERS [new file with mode: 0644]
board/renesas/eagle/Makefile [new file with mode: 0644]
board/renesas/eagle/eagle.c [new file with mode: 0644]
board/samsung/common/exynos5-dt-types.c
board/samsung/common/exynos5-dt.c
board/synopsys/hsdk/hsdk.c
common/image-fit.c
common/spl/spl_fit.c
configs/A10-OLinuXino-Lime_defconfig
configs/A20-OLinuXino-Lime2-eMMC_defconfig
configs/A20-OLinuXino-Lime2_defconfig
configs/A20-OLinuXino-Lime_defconfig
configs/A20-OLinuXino_MICRO-eMMC_defconfig
configs/A20-OLinuXino_MICRO_defconfig
configs/A20-Olimex-SOM-EVB_defconfig
configs/Bananapi_M2_Ultra_defconfig
configs/Bananapi_defconfig
configs/Bananapro_defconfig
configs/Cubieboard2_defconfig
configs/Cubieboard_defconfig
configs/Cubietruck_defconfig
configs/Itead_Ibox_A20_defconfig
configs/Lamobo_R1_defconfig
configs/Linksprite_pcDuino3_Nano_defconfig
configs/Linksprite_pcDuino3_defconfig
configs/MPC8315ERDB_defconfig
configs/MPC8349ITX_LOWBOOT_defconfig
configs/MPC8349ITX_defconfig
configs/MPC837XERDB_defconfig
configs/MPC8544DS_defconfig
configs/MPC8572DS_36BIT_defconfig
configs/MPC8572DS_defconfig
configs/MPC8610HPCD_defconfig
configs/MPC8641HPCN_36BIT_defconfig
configs/MPC8641HPCN_defconfig
configs/Marsboard_A10_defconfig
configs/Mele_A1000_defconfig
configs/Mele_M5_defconfig
configs/Orangepi_defconfig
configs/Orangepi_mini_defconfig
configs/TWR-P1025_defconfig
configs/Wits_Pro_A20_DKT_defconfig
configs/am57xx_evm_defconfig
configs/am57xx_hs_evm_defconfig
configs/apalis_imx6_defconfig
configs/apalis_imx6_nospl_com_defconfig
configs/apalis_imx6_nospl_it_defconfig
configs/bananapi_m1_plus_defconfig
configs/cgtqmx6eval_defconfig
configs/cl-som-am57x_defconfig
configs/cm_fx6_defconfig
configs/cm_t54_defconfig
configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
configs/controlcenterd_36BIT_SDCARD_defconfig
configs/controlcenterdc_defconfig
configs/d2net_v2_defconfig
configs/db-88f6820-gp_defconfig
configs/db-mv784mp-gp_defconfig
configs/dh_imx6_defconfig
configs/dms-ba16-1g_defconfig
configs/dms-ba16_defconfig
configs/dns325_defconfig
configs/dreamplug_defconfig
configs/ds109_defconfig
configs/edminiv2_defconfig
configs/goflexhome_defconfig
configs/guruplug_defconfig
configs/gwventana_emmc_defconfig
configs/gwventana_gw5904_defconfig
configs/gwventana_nand_defconfig
configs/highbank_defconfig
configs/ib62x0_defconfig
configs/inetspace_v2_defconfig
configs/ls1012aqds_qspi_defconfig
configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
configs/ls1088aqds_qspi_defconfig
configs/ls1088aqds_sdcard_qspi_defconfig
configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
configs/ls1088ardb_qspi_defconfig
configs/ls1088ardb_sdcard_qspi_defconfig
configs/ls2081ardb_defconfig
configs/lschlv2_defconfig
configs/lsxhl_defconfig
configs/m53evk_defconfig
configs/mvebu_db-88f3720_defconfig
configs/mvebu_db_armada8k_defconfig
configs/mvebu_espressobin-88f3720_defconfig
configs/mvebu_mcbin-88f8040_defconfig
configs/mx53loco_defconfig
configs/mx6cuboxi_defconfig
configs/mx6qsabrelite_defconfig
configs/nas220_defconfig
configs/net2big_v2_defconfig
configs/netspace_lite_v2_defconfig
configs/netspace_max_v2_defconfig
configs/netspace_mini_v2_defconfig
configs/netspace_v2_defconfig
configs/nitrogen6q2g_defconfig
configs/nitrogen6q_defconfig
configs/novena_defconfig
configs/nsa310s_defconfig
configs/odroid-xu3_defconfig
configs/omap3_logic_defconfig
configs/omap5_uevm_defconfig
configs/openrd_base_defconfig
configs/openrd_client_defconfig
configs/openrd_ultimate_defconfig
configs/ot1200_defconfig
configs/ot1200_spl_defconfig
configs/qemu_arm_defconfig
configs/r8a77970_eagle_defconfig [new file with mode: 0644]
configs/r8a77995_draak_defconfig [new file with mode: 0644]
configs/sheevaplug_defconfig
configs/tbs2910_defconfig
configs/theadorable_debug_defconfig
configs/turris_omnia_defconfig
configs/udoo_defconfig
configs/wandboard_defconfig
configs/xilinx_zynqmp_ep_defconfig
configs/xilinx_zynqmp_zcu102_rev1_0_defconfig
configs/xilinx_zynqmp_zcu102_revA_defconfig
configs/xilinx_zynqmp_zcu102_revB_defconfig
doc/device-tree-bindings/clock/snps,hsdk-cgu.txt [new file with mode: 0644]
doc/uImage.FIT/source_file_format.txt
drivers/ata/Kconfig
drivers/ata/Makefile
drivers/ata/mxc_ata.c [deleted file]
drivers/ata/sata_dwc.c [deleted file]
drivers/ata/sata_dwc.h [deleted file]
drivers/clk/Kconfig
drivers/clk/Makefile
drivers/clk/clk-hsdk-cgu.c [new file with mode: 0644]
drivers/clk/renesas/Kconfig
drivers/clk/renesas/clk-rcar-gen3.c
drivers/gpio/Kconfig
drivers/gpio/gpio-rcar.c
drivers/mmc/uniphier-sd.c
drivers/mtd/nand/Kconfig
drivers/net/ravb.c
drivers/pinctrl/renesas/Kconfig
drivers/pinctrl/renesas/Makefile
drivers/pinctrl/renesas/pfc-r8a77970.c [new file with mode: 0644]
drivers/pinctrl/renesas/pfc-r8a77995.c [new file with mode: 0644]
drivers/pinctrl/renesas/pfc.c
drivers/pinctrl/renesas/sh_pfc.h
drivers/spmi/spmi-msm.c
drivers/usb/host/r8a66597-hcd.c
include/configs/MPC8315ERDB.h
include/configs/MPC8349ITX.h
include/configs/MPC837XEMDS.h
include/configs/MPC837XERDB.h
include/configs/MPC8536DS.h
include/configs/MPC8544DS.h
include/configs/MPC8572DS.h
include/configs/MPC8610HPCD.h
include/configs/MPC8641HPCN.h
include/configs/P1010RDB.h
include/configs/P1022DS.h
include/configs/P2041RDB.h
include/configs/P4080DS.h
include/configs/T102xQDS.h
include/configs/T1040QDS.h
include/configs/T104xRDB.h
include/configs/T208xQDS.h
include/configs/T208xRDB.h
include/configs/T4240QDS.h
include/configs/T4240RDB.h
include/configs/UCP1020.h
include/configs/advantech_dms-ba16.h
include/configs/am57xx_evm.h
include/configs/apalis_imx6.h
include/configs/cgtqmx6eval.h
include/configs/cl-som-am57x.h
include/configs/cm_fx6.h
include/configs/cm_t54.h
include/configs/controlcenterd.h
include/configs/controlcenterdc.h
include/configs/corenet_ds.h
include/configs/cyrus.h
include/configs/db-88f6820-gp.h
include/configs/db-mv784mp-gp.h
include/configs/dh_imx6.h
include/configs/dra7xx_evm.h
include/configs/draak.h [new file with mode: 0644]
include/configs/eagle.h [new file with mode: 0644]
include/configs/edminiv2.h
include/configs/efi-x86.h
include/configs/galileo.h
include/configs/ge_bx50v3.h
include/configs/gw_ventana.h
include/configs/highbank.h
include/configs/ls1012aqds.h
include/configs/ls1012ardb.h
include/configs/ls1021aiot.h
include/configs/ls1043aqds.h
include/configs/ls1043ardb.h
include/configs/ls1046aqds.h
include/configs/ls1046ardb.h
include/configs/ls1088a_common.h
include/configs/ls2080aqds.h
include/configs/ls2080ardb.h
include/configs/m53evk.h
include/configs/mvebu_armada-37xx.h
include/configs/mvebu_armada-8k.h
include/configs/mx53loco.h
include/configs/mx6cuboxi.h
include/configs/nitrogen6x.h
include/configs/novena.h
include/configs/omap3_logic.h
include/configs/omap5_uevm.h
include/configs/ot1200.h
include/configs/p1_p2_rdb_pc.h
include/configs/p1_twr.h
include/configs/qemu-arm.h
include/configs/rcar-gen3-common.h
include/configs/sbc8641d.h
include/configs/sunxi-common.h
include/configs/t4qds.h
include/configs/tbs2910.h
include/configs/theadorable.h
include/configs/turris_omnia.h
include/configs/udoo.h
include/configs/wandboard.h
include/configs/x86-common.h
include/configs/xilinx_zynqmp.h
include/dt-bindings/clock/r8a77970-cpg-mssr.h [new file with mode: 0644]
include/dt-bindings/clock/r8a77995-cpg-mssr.h [new file with mode: 0644]
include/dt-bindings/clock/snps,hsdk-cgu.h [new file with mode: 0644]
include/dt-bindings/power/r8a77970-sysc.h [new file with mode: 0644]
include/dt-bindings/power/r8a77995-sysc.h [new file with mode: 0644]
include/image.h
include/samsung/exynos5-dt-types.h
scripts/config_whitelist.txt
test/py/tests/test_gpt.py
test/py/tests/test_sleep.py

index e1227f847cbb9470f4e349b9792b54f87394996f..e950267494a3c608b7f541dfe0b9f622295dcaf3 100644 (file)
@@ -65,6 +65,14 @@ S:   Maintained
 L:     uboot-snps-arc@synopsys.com
 F:     drivers/gpio/hsdk-creg-gpio.c
 
+ARC HSDK CGU CLOCK
+M:     Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+S:     Maintained
+L:     uboot-snps-arc@synopsys.com
+F:     drivers/clk/clk-hsdk-cgu.c
+F:     include/dt-bindings/clock/snps,hsdk-cgu.h
+F:     doc/device-tree-bindings/clock/snps,hsdk-cgu.txt
+
 ARM
 M:     Albert Aribaud <albert.u.boot@aribaud.net>
 S:     Maintained
diff --git a/README b/README
index 2df0e1f8a78e66f075a6c5c0991402440f064c4f..93c7ea966589984c334213fd6d84f8baa8521109 100644 (file)
--- a/README
+++ b/README
@@ -5126,8 +5126,9 @@ Coding Standards:
 -----------------
 
 All contributions to U-Boot should conform to the Linux kernel
-coding style; see the file "Documentation/CodingStyle" and the script
-"scripts/Lindent" in your Linux kernel source directory.
+coding style; see the kernel coding style guide at
+https://www.kernel.org/doc/html/latest/process/coding-style.html, and the
+script "scripts/Lindent" in your Linux kernel source directory.
 
 Source files originating from a different project (for example the
 MTD subsystem) are generally exempt from these guidelines and are not
index 54a9b00d4c24cb3c0bc83d2a62631b8ad54ed28e..ba1f7bac77c77bd5e8d83469e0758bae25847d15 100644 (file)
 #define ARC_AUX_IC_PTAG                0x1E
 #endif
 #define ARC_BCR_IC_BUILD       0x77
+#define AUX_AUX_CACHE_LIMIT            0x5D
+#define ARC_AUX_NON_VOLATILE_LIMIT     0x5E
+
+/* ICCM and DCCM auxiliary registers */
+#define ARC_AUX_DCCM_BASE      0x18    /* DCCM Base Addr ARCv2 */
+#define ARC_AUX_ICCM_BASE      0x208   /* ICCM Base Addr ARCv2 */
 
 /* Timer related auxiliary registers */
 #define ARC_AUX_TIMER0_CNT     0x21    /* Timer 0 count */
@@ -72,6 +78,9 @@
 /* gcc builtin sr needs reg param to be long immediate */
 #define write_aux_reg(reg_immed, val)          \
                __builtin_arc_sr((unsigned int)val, reg_immed)
+
+/* ARCNUM [15:8] - field to identify each core in a multi-core system */
+#define CPU_ID_GET()   ((read_aux_reg(ARC_AUX_IDENTITY) & 0xFF00) >> 8)
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_ARC_ARCREGS_H */
diff --git a/arch/arc/include/asm/gpio.h b/arch/arc/include/asm/gpio.h
new file mode 100644 (file)
index 0000000..306ab4c
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/gpio.h>
index d8741fe959c3fc7ddec39ecaf6bfaa7443cb8d38..1073e1570fa7906ac106bb32a5311d7f99054baf 100644 (file)
  * relocation but will be used after being zeroed.
  */
 int l1_line_sz __section(".data");
-int dcache_exists __section(".data");
-int icache_exists __section(".data");
+bool dcache_exists __section(".data") = false;
+bool icache_exists __section(".data") = false;
 
 #define CACHE_LINE_MASK                (~(l1_line_sz - 1))
 
 #ifdef CONFIG_ISA_ARCV2
 int slc_line_sz __section(".data");
-int slc_exists __section(".data");
-int ioc_exists __section(".data");
+bool slc_exists __section(".data") = false;
+bool ioc_exists __section(".data") = false;
 
 static unsigned int __before_slc_op(const int op)
 {
@@ -152,7 +152,7 @@ static void read_decode_cache_bcr_arcv2(void)
        sbcr.word = read_aux_reg(ARC_BCR_SLC);
        if (sbcr.fields.ver) {
                slc_cfg.word = read_aux_reg(ARC_AUX_SLC_CONFIG);
-               slc_exists = 1;
+               slc_exists = true;
                slc_line_sz = (slc_cfg.fields.lsz == 0) ? 128 : 64;
        }
 
@@ -169,7 +169,7 @@ static void read_decode_cache_bcr_arcv2(void)
 
        cbcr.word = read_aux_reg(ARC_BCR_CLUSTER);
        if (cbcr.fields.c)
-               ioc_exists = 1;
+               ioc_exists = true;
 }
 #endif
 
@@ -190,7 +190,7 @@ void read_decode_cache_bcr(void)
 
        ibcr.word = read_aux_reg(ARC_BCR_IC_BUILD);
        if (ibcr.fields.ver) {
-               icache_exists = 1;
+               icache_exists = true;
                l1_line_sz = ic_line_sz = 8 << ibcr.fields.line_len;
                if (!ic_line_sz)
                        panic("Instruction exists but line length is 0\n");
@@ -198,7 +198,7 @@ void read_decode_cache_bcr(void)
 
        dbcr.word = read_aux_reg(ARC_BCR_DC_BUILD);
        if (dbcr.fields.ver){
-               dcache_exists = 1;
+               dcache_exists = true;
                l1_line_sz = dc_line_sz = 16 << dbcr.fields.line_len;
                if (!dc_line_sz)
                        panic("Data cache exists but line length is 0\n");
index e50ba930a17c21261cdede4d993168e9fa5fa32f..73909952d0e692df5944b72ba9aa4d4deedf8842 100644 (file)
@@ -850,6 +850,7 @@ config TARGET_LS2080AQDS
        select SUPPORT_SPL
        select ARCH_MISC_INIT
        imply SCSI
+       imply SCSI_AHCI
        help
          Support for Freescale LS2080AQDS platform
          The LS2080A Development System (QDS) is a high-performance
@@ -865,6 +866,7 @@ config TARGET_LS2080ARDB
        select SUPPORT_SPL
        select ARCH_MISC_INIT
        imply SCSI
+       imply SCSI_AHCI
        help
          Support for Freescale LS2080ARDB platform.
          The LS2080A Reference design board (RDB) is a high-performance
@@ -926,6 +928,7 @@ config TARGET_LS1012ARDB
        select ARM64
        select BOARD_LATE_INIT
        imply SCSI
+       imply SCSI_AHCI
        help
          Support for Freescale LS1012ARDB platform.
          The LS1012A Reference design board (RDB) is a high-performance
index 20e2b1a50abf77b614a8c80fbff1297125e5a2b7..635358e328381fc8238aaef50f4b55b68288de93 100644 (file)
@@ -20,6 +20,7 @@ config ARCH_LS1021A
        select SYS_FSL_SEC_COMPAT_5
        select SYS_FSL_SEC_LE
        imply SCSI
+       imply SCSI_AHCI
        imply CMD_PCI
 
 menu "LS102xA architecture"
index 5a75920400939a4294139a85518b96a32bfad489..66bc32cc85113aec1b9b3d8b19bd6721dbed37d7 100644 (file)
@@ -35,6 +35,7 @@ config ARCH_LS1043A
        select ARCH_EARLY_INIT_R
        select BOARD_EARLY_INIT_F
        imply SCSI
+       imply SCSI_AHCI
        imply CMD_PCI
 
 config ARCH_LS1046A
@@ -61,6 +62,7 @@ config ARCH_LS1046A
        select ARCH_EARLY_INIT_R
        select BOARD_EARLY_INIT_F
        imply SCSI
+       imply SCSI_AHCI
 
 config ARCH_LS1088A
        bool
index ed85349d3fcd12c84be9e1c8e5383b7dda1ebe66..1c9ac1468b2625c02395e51dc773f8f5d76cb634 100644 (file)
@@ -393,7 +393,9 @@ dtb-$(CONFIG_RCAR_GEN3) += \
        r8a7795-h3ulcb.dtb \
        r8a7795-salvator-x.dtb \
        r8a7796-m3ulcb.dtb \
-       r8a7796-salvator-x.dtb
+       r8a7796-salvator-x.dtb \
+       r8a77970-eagle.dtb \
+       r8a77995-draak.dtb
 
 dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \
        keystone-k2l-evm.dtb \
index 53d39dcb0ca2ed30d6d73bbe61613e5059260b37..2757aa249cf652315cdc11046209b76cb8efbe7c 100644 (file)
                reg = <0x10440000 0x1000>;
        };
 
-       serial@13800000 {
+       gic: interrupt-controller@10490000 {
+               compatible = "arm,cortex-a9-gic";
+               #interrupt-cells = <3>;
+               interrupt-controller;
+               cpu-offset = <0x4000>;
+               reg = <0x10490000 0x10000>, <0x10480000 0x10000>;
+       };
+
+       serial_0: serial@13800000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0x13800000 0x3c>;
                id = <0>;
        };
 
-       serial@13810000 {
+       serail_1: serial@13810000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0x13810000 0x3c>;
                id = <1>;
        };
 
-       serial@13820000 {
+       serial_2: serial@13820000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0x13820000 0x3c>;
                id = <2>;
        };
 
-       serial@13830000 {
+       serial_3: serial@13830000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0x13830000 0x3c>;
                id = <3>;
        };
 
-       serial@13840000 {
+       serial_4: serial@13840000 {
                compatible = "samsung,exynos4210-uart";
                reg = <0x13840000 0x3c>;
                id = <4>;
@@ -63,6 +71,7 @@
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13860000 0x100>;
+               interrupt-parent = <&gic>;
                interrupts = <0 56 0>;
        };
 
@@ -71,6 +80,7 @@
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13870000 0x100>;
+               interrupt-parent = <&gic>;
                interrupts = <1 57 0>;
        };
 
@@ -79,6 +89,7 @@
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13880000 0x100>;
+               interrupt-parent = <&gic>;
                interrupts = <2 58 0>;
        };
 
@@ -87,6 +98,7 @@
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13890000 0x100>;
+               interrupt-parent = <&gic>;
                interrupts = <3 59 0>;
        };
 
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138a0000 0x100>;
+               interrupt-parent = <&gic>;
                interrupts = <4 60 0>;
        };
 
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138b0000 0x100>;
+               interrupt-parent = <&gic>;
                interrupts = <5 61 0>;
        };
 
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138c0000 0x100>;
+               interrupt-parent = <&gic>;
                interrupts = <6 62 0>;
        };
 
                #size-cells = <0>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138d0000 0x100>;
+               interrupt-parent = <&gic>;
                interrupts = <7 63 0>;
        };
 
                #size-cells = <0>;
                compatible = "samsung,exynos4412-sdhci";
                reg = <0x12510000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 75 0>;
                status = "disabled";
        };
                #size-cells = <0>;
                compatible = "samsung,exynos4412-sdhci";
                reg = <0x12520000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 76 0>;
                status = "disabled";
        };
                #size-cells = <0>;
                compatible = "samsung,exynos4412-sdhci";
                reg = <0x12530000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 77 0>;
                status = "disabled";
        };
                #size-cells = <0>;
                compatible = "samsung,exynos4412-sdhci";
                reg = <0x12540000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 78 0>;
                status = "disabled";
        };
                #size-cells = <0>;
                compatible = "samsung,exynos4412-dw-mshc";
                reg = <0x12550000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 131 0>;
                status = "disabled";
        };
index 634a5c1dd2759d1b62be11e7818cba9417079cba..b04a86b8278f60f7adf5fa9e73a9f5ba7898801a 100644 (file)
                cpu-offset = <0x8000>;
        };
 
-       combiner: interrupt-controller@10440000 {
-               samsung,combiner-nr = <16>;
-               interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
-                            <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
-                            <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
-                            <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
-       };
-
        mct@10050000 {
                compatible = "samsung,exynos4210-mct";
                reg = <0x10050000 0x800>;
        pinctrl_0: pinctrl@11400000 {
                compatible = "samsung,exynos4210-pinctrl";
                reg = <0x11400000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 47 0>;
        };
 
        pinctrl_1: pinctrl@11000000 {
                compatible = "samsung,exynos4210-pinctrl";
                reg = <0x11000000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 46 0>;
 
                wakup_eint: wakeup-interrupt-controller {
        g2d@12800000 {
                compatible = "samsung,s5pv210-g2d";
                reg = <0x12800000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 89 0>;
                clocks = <&clock 177>, <&clock 277>;
                clock-names = "sclk_fimg2d", "fimg2d";
                };
        };
 };
+
+&combiner {
+       samsung,combiner-nr = <16>;
+       interrupt-parent = <&gic>;
+       interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
+                    <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
+                    <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
+                    <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
+};
index ecfd5d1e8b7a81051f3ed7657412373e4d5dd1cf..daa0d30f91f799906f534c5871c407676587ef07 100644 (file)
        compatible = "samsung,odroid", "samsung,exynos4412";
 
        aliases {
-               i2c0 = "/i2c@13860000";
-               i2c1 = "/i2c@13870000";
-               i2c2 = "/i2c@13880000";
-               i2c3 = "/i2c@13890000";
-               i2c4 = "/i2c@138a0000";
-               i2c5 = "/i2c@138b0000";
-               i2c6 = "/i2c@138c0000";
-               i2c7 = "/i2c@138d0000";
                serial0 = "/serial@13800000";
                console = "/serial@13810000";
                mmc0 = &mshc_0;
                mmc1 = &sdhci2;
        };
 
-       i2c@13860000 {
-               samsung,i2c-sda-delay = <100>;
-               samsung,i2c-slave-addr = <0x10>;
-               samsung,i2c-max-bus-freq = <100000>;
-               status = "okay";
-
-               max77686_pmic@09 {
-                       compatible = "maxim,max77686";
-                       interrupts = <7 0>;
-                       reg = <0x09 0 0>;
-                       #clock-cells = <1>;
-
-                       voltage-regulators {
-                               ldo1_reg: LDO1 {
-                                       regulator-name = "VDD_ALIVE_1.0V";
-                                       regulator-min-microvolt = <1000000>;
-                                       regulator-max-microvolt = <1000000>;
-                               };
-
-                               ldo2_reg: LDO2 {
-                                       regulator-name = "VDDQ_VM1M2_1.2V";
-                                       regulator-min-microvolt = <1200000>;
-                                       regulator-max-microvolt = <1200000>;
-                               };
-
-                               ldo3_reg: LDO3 {
-                                       regulator-name = "VCC_1.8V_AP";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                               };
-
-                               ldo4_reg: LDO4 {
-                                       regulator-name = "VDDQ_MMC2_2.8V";
-                                       regulator-min-microvolt = <2800000>;
-                                       regulator-max-microvolt = <2800000>;
-                               };
-
-                               ldo5_reg: LDO5 {
-                                       regulator-name = "VDDQ_MMC0/1/3_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                               };
-
-                               ldo6_reg: LDO6 {
-                                       regulator-name = "VMPLL_1.0V";
-                                       regulator-min-microvolt = <1100000>;
-                                       regulator-max-microvolt = <1100000>;
-                               };
-
-                               ldo7_reg: LDO7 {
-                                       regulator-name = "VPLL_1.1V";
-                                       regulator-min-microvolt = <1100000>;
-                                       regulator-max-microvolt = <1100000>;
-                               };
-
-                               ldo8_reg: LDO8 {
-                                       regulator-name = "VDD_MIPI/HDMI_1.0V";
-                                       regulator-min-microvolt = <1000000>;
-                                       regulator-max-microvolt = <1000000>;
-                               };
-
-                               ldo10_reg: LDO10 {
-                                       regulator-name = "VDD_MIPI/HDMI_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                               };
-
-                               ldo11_reg: LDO11 {
-                                       regulator-name = "VDD_ABB1_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                               };
-
-                               ldo12_reg: LDO12 {
-                                       regulator-name = "VDD_UOTG_3.0V";
-                                       regulator-min-microvolt = <3000000>;
-                                       regulator-max-microvolt = <3000000>;
-                               };
-
-                               ldo13_reg: LDO13 {
-                                       regulator-name = "VDD_C2C_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                               };
-
-                               ldo14_reg: LDO14 {
-                                       regulator-name = "VDD_ABB02_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                               };
-
-                               ldo15_reg: LDO15 {
-                                       regulator-name = "VDD_HSIC/OTG_1.0V";
-                                       regulator-min-microvolt = <1000000>;
-                                       regulator-max-microvolt = <1000000>;
-                               };
-
-                               ldo16_reg: LDO16 {
-                                       regulator-name = "VDD_HSIC_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                               };
-
-                               ldo17_reg: LDO17 {
-                                       regulator-name = "VDDQ_CAM_1.2V";
-                                       regulator-min-microvolt = <1200000>;
-                                       regulator-max-microvolt = <1200000>;
-                               };
-
-                               ldo20_reg: LDO20 {
-                                       regulator-name = "VDDQ_EMMC_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                               };
-
-                               ldo21_reg: LDO21 {
-                                       regulator-name = "TFLASH_2.8V";
-                                       regulator-min-microvolt = <2800000>;
-                                       regulator-max-microvolt = <2800000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                               };
-
-                               ldo22_reg: LDO22 {
-                                       regulator-name = "VDDQ_EMMC_2.8V";
-                                       regulator-min-microvolt = <2800000>;
-                                       regulator-max-microvolt = <2800000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                               };
-
-                               ldo25_reg: LDO25 {
-                                       regulator-compatible = "LDO25";
-                                       regulator-name = "VDDQ_LCD_3.0V";
-                                       regulator-min-microvolt = <3000000>;
-                                       regulator-max-microvolt = <3000000>;
-                               };
-
-                               buck1_reg: BUCK1 {
-                                       regulator-name = "VDD_MIF_1.0V";
-                                       regulator-min-microvolt = <8500000>;
-                                       regulator-max-microvolt = <1100000>;
-                               };
-
-                               buck2_reg: BUCK2 {
-                                       regulator-name = "VDD_ARM_1.0V";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1500000>;
-                               };
-
-                               buck3_reg: BUCK3 {
-                                       regulator-name = "VDD_INT_1.1V";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1150000>;
-                               };
-
-                               buck4_reg: BUCK4 {
-                                       regulator-name = "VDD_G3D_1.0V";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1150000>;
-                               };
-
-                               buck5_reg: BUCK5 {
-                                       regulator-name = "VDDQ_AP_1.2V";
-                                       regulator-min-microvolt = <1200000>;
-                                       regulator-max-microvolt = <1200000>;
-                               };
-
-                               buck6_reg: BUCK6 {
-                                       regulator-name = "VCC_INL1/7_1.35V";
-                                       regulator-min-microvolt = <1350000>;
-                                       regulator-max-microvolt = <1350000>;
-                               };
-
-                               buck7_reg: BUCK7 {
-                                       regulator-name = "VCC_INL2/3/5_2.0V";
-                                       regulator-min-microvolt = <2000000>;
-                                       regulator-max-microvolt = <2000000>;
-                               };
-
-                               buck8_reg: BUCK8 {
-                                       regulator-name = "VCC_P3V3_2.85V";
-                                       regulator-min-microvolt = <750000>;
-                                       regulator-max-microvolt = <3300000>;
-                               };
-                       };
-               };
-       };
-
        serial@13810000 {
                status = "okay";
        };
        };
 };
 
+&i2c_0 {
+       samsung,i2c-sda-delay = <100>;
+       samsung,i2c-slave-addr = <0x10>;
+       samsung,i2c-max-bus-freq = <100000>;
+       status = "okay";
+
+       max77686: max77686_pmic@09 {
+               compatible = "maxim,max77686";
+               interrupt-parent = <&gpx3>;
+               interrupts = <7 0>;
+               reg = <0x09 0 0>;
+               #clock-cells = <1>;
+
+               voltage-regulators {
+                       ldo1_reg: LDO1 {
+                               regulator-name = "VDD_ALIVE_1.0V";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                       };
+
+                       ldo2_reg: LDO2 {
+                               regulator-name = "VDDQ_VM1M2_1.2V";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                       };
+
+                       ldo3_reg: LDO3 {
+                               regulator-name = "VCC_1.8V_AP";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                       };
+
+                       ldo4_reg: LDO4 {
+                               regulator-name = "VDDQ_MMC2_2.8V";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                       };
+
+                       ldo5_reg: LDO5 {
+                               regulator-name = "VDDQ_MMC0/1/3_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                       };
+
+                       ldo6_reg: LDO6 {
+                               regulator-name = "VMPLL_1.0V";
+                               regulator-min-microvolt = <1100000>;
+                               regulator-max-microvolt = <1100000>;
+                       };
+
+                       ldo7_reg: LDO7 {
+                               regulator-name = "VPLL_1.1V";
+                               regulator-min-microvolt = <1100000>;
+                               regulator-max-microvolt = <1100000>;
+                       };
+
+                       ldo8_reg: LDO8 {
+                               regulator-name = "VDD_MIPI/HDMI_1.0V";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                       };
+
+                       ldo10_reg: LDO10 {
+                               regulator-name = "VDD_MIPI/HDMI_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                       };
+
+                       ldo11_reg: LDO11 {
+                               regulator-name = "VDD_ABB1_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                       };
+
+                       ldo12_reg: LDO12 {
+                               regulator-name = "VDD_UOTG_3.0V";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                       };
+
+                       ldo13_reg: LDO13 {
+                               regulator-name = "VDD_C2C_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                       };
+
+                       ldo14_reg: LDO14 {
+                               regulator-name = "VDD_ABB02_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                       };
+
+                       ldo15_reg: LDO15 {
+                               regulator-name = "VDD_HSIC/OTG_1.0V";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                       };
+
+                       ldo16_reg: LDO16 {
+                               regulator-name = "VDD_HSIC_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                       };
+
+                       ldo17_reg: LDO17 {
+                               regulator-name = "VDDQ_CAM_1.2V";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                       };
+
+                       ldo20_reg: LDO20 {
+                               regulator-name = "VDDQ_EMMC_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       ldo21_reg: LDO21 {
+                               regulator-name = "TFLASH_2.8V";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       ldo22_reg: LDO22 {
+                               regulator-name = "VDDQ_EMMC_2.8V";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       ldo25_reg: LDO25 {
+                               regulator-compatible = "LDO25";
+                               regulator-name = "VDDQ_LCD_3.0V";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                       };
+
+                       buck1_reg: BUCK1 {
+                               regulator-name = "VDD_MIF_1.0V";
+                               regulator-min-microvolt = <8500000>;
+                               regulator-max-microvolt = <1100000>;
+                       };
+
+                       buck2_reg: BUCK2 {
+                               regulator-name = "VDD_ARM_1.0V";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1500000>;
+                       };
+
+                       buck3_reg: BUCK3 {
+                               regulator-name = "VDD_INT_1.1V";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1150000>;
+                       };
+
+                       buck4_reg: BUCK4 {
+                               regulator-name = "VDD_G3D_1.0V";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1150000>;
+                       };
+
+                       buck5_reg: BUCK5 {
+                               regulator-name = "VDDQ_AP_1.2V";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                       };
+
+                       buck6_reg: BUCK6 {
+                               regulator-name = "VCC_INL1/7_1.35V";
+                               regulator-min-microvolt = <1350000>;
+                               regulator-max-microvolt = <1350000>;
+                       };
+
+                       buck7_reg: BUCK7 {
+                               regulator-name = "VCC_INL2/3/5_2.0V";
+                               regulator-min-microvolt = <2000000>;
+                               regulator-max-microvolt = <2000000>;
+                       };
+
+                       buck8_reg: BUCK8 {
+                               regulator-name = "VCC_P3V3_2.85V";
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+               };
+       };
+};
+
 &sdhci2 {
        samsung,bus-width = <4>;
        samsung,timing = <1 2 3>;
index 0938e7941a7b9fa4ac4d4f720eac8808f03198f2..61b5133786953a43afa62ce6fb6b9429b1bd68b1 100644 (file)
        };
 
        aliases {
-               i2c0 = "/i2c@13860000";
-               i2c1 = "/i2c@13870000";
-               i2c2 = "/i2c@13880000";
-               i2c3 = "/i2c@13890000";
-               i2c4 = "/i2c@138a0000";
-               i2c5 = "/i2c@138b0000";
-               i2c6 = "/i2c@138c0000";
-               i2c7 = "/i2c@138d0000";
                i2c8 = &i2c_fg;
                i2c9 = &i2c_max77693;
                serial0 = "/serial@13800000";
                status = "okay";
        };
 
-       i2c@138d0000 {
-               samsung,i2c-sda-delay = <100>;
-               samsung,i2c-slave-addr = <0x10>;
-               samsung,i2c-max-bus-freq = <100000>;
-               status = "okay";
-
-               max77686_pmic@09 {
-                       compatible = "maxim,max77686";
-                       interrupts = <7 0>;
-                       reg = <0x09 0 0>;
-                       #clock-cells = <1>;
-
-                       voltage-regulators {
-                               ldo1_reg: LDO1 {
-                                       regulator-compatible = "LDO1";
-                                       regulator-name = "VALIVE_1.0V_AP";
-                                       regulator-min-microvolt = <1000000>;
-                                       regulator-max-microvolt = <1000000>;
-                                       regulator-always-on;
-                                       regulator-mem-on;
-                               };
-
-                               ldo2_reg: LDO2 {
-                                       regulator-compatible = "LDO2";
-                                       regulator-name = "VM1M2_1.2V_AP";
-                                       regulator-min-microvolt = <1200000>;
-                                       regulator-max-microvolt = <1200000>;
-                                       regulator-always-on;
-                                       regulator-mem-on;
-                               };
-
-                               ldo3_reg: LDO3 {
-                                       regulator-compatible = "LDO3";
-                                       regulator-name = "VCC_1.8V_AP";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-always-on;
-                                       regulator-mem-on;
-                               };
-
-                               ldo4_reg: LDO4 {
-                                       regulator-compatible = "LDO4";
-                                       regulator-name = "VCC_2.8V_AP";
-                                       regulator-min-microvolt = <2800000>;
-                                       regulator-max-microvolt = <2800000>;
-                                       regulator-always-on;
-                                       regulator-mem-on;
-                               };
-
-                               ldo5_reg: LDO5 {
-                                       regulator-compatible = "LDO5";
-                                       regulator-name = "VCC_1.8V_IO";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-always-on;
-                                       regulator-mem-on;
-                               };
-
-                               ldo6_reg: LDO6 {
-                                       regulator-compatible = "LDO6";
-                                       regulator-name = "VMPLL_1.0V_AP";
-                                       regulator-min-microvolt = <1000000>;
-                                       regulator-max-microvolt = <1000000>;
-                                       regulator-always-on;
-                                       regulator-mem-on;
-                               };
-
-                               ldo7_reg: LDO7 {
-                                       regulator-compatible = "LDO7";
-                                       regulator-name = "VPLL_1.0V_AP";
-                                       regulator-min-microvolt = <1000000>;
-                                       regulator-max-microvolt = <1000000>;
-                                       regulator-always-on;
-                                       regulator-mem-on;
-                               };
-
-                               ldo8_reg: LDO8 {
-                                       regulator-compatible = "LDO8";
-                                       regulator-name = "VMIPI_1.0V";
-                                       regulator-min-microvolt = <1000000>;
-                                       regulator-max-microvolt = <1000000>;
-                                       regulator-mem-off;
-                               };
-
-                               ldo9_reg: LDO9 {
-                                       regulator-compatible = "LDO9";
-                                       regulator-name = "CAM_ISP_MIPI_1.2V";
-                                       regulator-min-microvolt = <1200000>;
-                                       regulator-max-microvolt = <1200000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo10_reg: LDO10 {
-                                       regulator-compatible = "LDO10";
-                                       regulator-name = "VMIPI_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-mem-off;
-                               };
-
-                               ldo11_reg: LDO11 {
-                                       regulator-compatible = "LDO11";
-                                       regulator-name = "VABB1_1.95V";
-                                       regulator-min-microvolt = <1950000>;
-                                       regulator-max-microvolt = <1950000>;
-                                       regulator-always-on;
-                                       regulator-mem-off;
-                               };
-
-                               ldo12_reg: LDO12 {
-                                       regulator-compatible = "LDO12";
-                                       regulator-name = "VUOTG_3.0V";
-                                       regulator-min-microvolt = <3000000>;
-                                       regulator-max-microvolt = <3000000>;
-                                       regulator-mem-off;
-                               };
-
-                               ldo13_reg: LDO13 {
-                                       regulator-compatible = "LDO13";
-                                       regulator-name = "NFC_AVDD_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo14_reg: LDO14 {
-                                       regulator-compatible = "LDO14";
-                                       regulator-name = "VABB2_1.95V";
-                                       regulator-min-microvolt = <1950000>;
-                                       regulator-max-microvolt = <1950000>;
-                                       regulator-always-on;
-                                       regulator-mem-off;
-                               };
-
-                               ldo15_reg: LDO15 {
-                                       regulator-compatible = "LDO15";
-                                       regulator-name = "VHSIC_1.0V";
-                                       regulator-min-microvolt = <1000000>;
-                                       regulator-max-microvolt = <1000000>;
-                                       regulator-mem-off;
-                               };
-
-                               ldo16_reg: LDO16 {
-                                       regulator-compatible = "LDO16";
-                                       regulator-name = "VHSIC_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-mem-off;
-                               };
-
-                               ldo17_reg: LDO17 {
-                                       regulator-compatible = "LDO17";
-                                       regulator-name = "CAM_SENSOR_CORE_1.2V";
-                                       regulator-min-microvolt = <1200000>;
-                                       regulator-max-microvolt = <1200000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo18_reg: LDO18 {
-                                       regulator-compatible = "LDO18";
-                                       regulator-name = "CAM_ISP_SEN_IO_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo19_reg: LDO19 {
-                                       regulator-compatible = "LDO19";
-                                       regulator-name = "VT_CAM_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo20_reg: LDO20 {
-                                       regulator-compatible = "LDO20";
-                                       regulator-name = "VDDQ_PRE_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo21_reg: LDO21 {
-                                       regulator-compatible = "LDO21";
-                                       regulator-name = "VTF_2.8V";
-                                       regulator-min-microvolt = <2800000>;
-                                       regulator-max-microvolt = <2800000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo22_reg: LDO22 {
-                                       regulator-compatible = "LDO22";
-                                       regulator-name = "VMEM_VDD_2.8V";
-                                       regulator-min-microvolt = <2800000>;
-                                       regulator-max-microvolt = <2800000>;
-                                       regulator-always-on;
-                                       regulator-mem-off;
-                               };
-
-                               ldo23_reg: LDO23 {
-                                       regulator-compatible = "LDO23";
-                                       regulator-name = "TSP_AVDD_3.3V";
-                                       regulator-min-microvolt = <3300000>;
-                                       regulator-max-microvolt = <3300000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo24_reg: LDO24 {
-                                       regulator-compatible = "LDO24";
-                                       regulator-name = "TSP_VDD_1.8V";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo25_reg: LDO25 {
-                                       regulator-compatible = "LDO25";
-                                       regulator-name = "LCD_VCC_3.3V";
-                                       regulator-min-microvolt = <2800000>;
-                                       regulator-max-microvolt = <2800000>;
-                                       regulator-mem-idle;
-                               };
-
-                               ldo26_reg: LDO26 {
-                                       regulator-compatible = "LDO26";
-                                       regulator-name = "MOTOR_VCC_3.0V";
-                                       regulator-min-microvolt = <3000000>;
-                                       regulator-max-microvolt = <3000000>;
-                                       regulator-mem-idle;
-                               };
-
-                               buck1_reg: BUCK1 {
-                                       regulator-compatible = "BUCK1";
-                                       regulator-name = "vdd_mif";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1100000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                                       regulator-mem-off;
-                               };
-
-                               buck2_reg: BUCK2 {
-                                       regulator-compatible = "BUCK2";
-                                       regulator-name = "vdd_arm";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1500000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                                       regulator-mem-off;
-                               };
-
-                               buck3_reg: BUCK3 {
-                                       regulator-compatible = "BUCK3";
-                                       regulator-name = "vdd_int";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1150000>;
-                                       regulator-always-on;
-                                       regulator-boot-on;
-                                       regulator-mem-off;
-                               };
-
-                               buck4_reg: BUCK4 {
-                                       regulator-compatible = "BUCK4";
-                                       regulator-name = "vdd_g3d";
-                                       regulator-min-microvolt = <850000>;
-                                       regulator-max-microvolt = <1150000>;
-                                       regulator-boot-on;
-                                       regulator-mem-off;
-                               };
-
-                               buck5_reg: BUCK5 {
-                                       regulator-compatible = "BUCK5";
-                                       regulator-name = "VMEM_1.2V_AP";
-                                       regulator-min-microvolt = <1200000>;
-                                       regulator-max-microvolt = <1200000>;
-                                       regulator-always-on;
-                               };
-
-                               buck6_reg: BUCK6 {
-                                       regulator-compatible = "BUCK6";
-                                       regulator-name = "VCC_SUB_1.35V";
-                                       regulator-min-microvolt = <1350000>;
-                                       regulator-max-microvolt = <1350000>;
-                                       regulator-always-on;
-                               };
-
-                               buck7_reg: BUCK7 {
-                                       regulator-compatible = "BUCK7";
-                                       regulator-name = "VCC_SUB_2.0V";
-                                       regulator-min-microvolt = <2000000>;
-                                       regulator-max-microvolt = <2000000>;
-                                       regulator-always-on;
-                               };
-
-                               buck8_reg: BUCK8 {
-                                       regulator-compatible = "BUCK8";
-                                       regulator-name = "VMEM_VDDF_3.0V";
-                                       regulator-min-microvolt = <2850000>;
-                                       regulator-max-microvolt = <2850000>;
-                                       regulator-always-on;
-                                       regulator-mem-off;
-                               };
-
-                               buck9_reg: BUCK9 {
-                                       regulator-compatible = "BUCK9";
-                                       regulator-name = "CAM_ISP_CORE_1.2V";
-                                       regulator-min-microvolt = <1000000>;
-                                       regulator-max-microvolt = <1200000>;
-                                       regulator-mem-off;
-                               };
-                       };
-               };
-       };
-
        fimd@11c00000 {
                compatible = "samsung,exynos-fimd";
                reg = <0x11c00000 0xa4>;
        };
 };
 
+&i2c_7 {
+       samsung,i2c-sda-delay = <100>;
+       samsung,i2c-slave-addr = <0x10>;
+       samsung,i2c-max-bus-freq = <100000>;
+       status = "okay";
+
+       max77686: max77686_pmic@09 {
+               compatible = "maxim,max77686";
+               interrupt-parent = <&gpx0>;
+               interrupts = <7 0>;
+               reg = <0x09 0 0>;
+               #clock-cells = <1>;
+
+               voltage-regulators {
+                       ldo1_reg: LDO1 {
+                               regulator-compatible = "LDO1";
+                               regulator-name = "VALIVE_1.0V_AP";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                               regulator-mem-on;
+                       };
+
+                       ldo2_reg: LDO2 {
+                               regulator-compatible = "LDO2";
+                               regulator-name = "VM1M2_1.2V_AP";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-always-on;
+                               regulator-mem-on;
+                       };
+
+                       ldo3_reg: LDO3 {
+                               regulator-compatible = "LDO3";
+                               regulator-name = "VCC_1.8V_AP";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               regulator-mem-on;
+                       };
+
+                       ldo4_reg: LDO4 {
+                               regulator-compatible = "LDO4";
+                               regulator-name = "VCC_2.8V_AP";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-always-on;
+                               regulator-mem-on;
+                       };
+
+                       ldo5_reg: LDO5 {
+                               regulator-compatible = "LDO5";
+                               regulator-name = "VCC_1.8V_IO";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                               regulator-mem-on;
+                       };
+
+                       ldo6_reg: LDO6 {
+                               regulator-compatible = "LDO6";
+                               regulator-name = "VMPLL_1.0V_AP";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                               regulator-mem-on;
+                       };
+
+                       ldo7_reg: LDO7 {
+                               regulator-compatible = "LDO7";
+                               regulator-name = "VPLL_1.0V_AP";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                               regulator-mem-on;
+                       };
+
+                       ldo8_reg: LDO8 {
+                               regulator-compatible = "LDO8";
+                               regulator-name = "VMIPI_1.0V";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-mem-off;
+                       };
+
+                       ldo9_reg: LDO9 {
+                               regulator-compatible = "LDO9";
+                               regulator-name = "CAM_ISP_MIPI_1.2V";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo10_reg: LDO10 {
+                               regulator-compatible = "LDO10";
+                               regulator-name = "VMIPI_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-mem-off;
+                       };
+
+                       ldo11_reg: LDO11 {
+                               regulator-compatible = "LDO11";
+                               regulator-name = "VABB1_1.95V";
+                               regulator-min-microvolt = <1950000>;
+                               regulator-max-microvolt = <1950000>;
+                               regulator-always-on;
+                               regulator-mem-off;
+                       };
+
+                       ldo12_reg: LDO12 {
+                               regulator-compatible = "LDO12";
+                               regulator-name = "VUOTG_3.0V";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-mem-off;
+                       };
+
+                       ldo13_reg: LDO13 {
+                               regulator-compatible = "LDO13";
+                               regulator-name = "NFC_AVDD_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo14_reg: LDO14 {
+                               regulator-compatible = "LDO14";
+                               regulator-name = "VABB2_1.95V";
+                               regulator-min-microvolt = <1950000>;
+                               regulator-max-microvolt = <1950000>;
+                               regulator-always-on;
+                               regulator-mem-off;
+                       };
+
+                       ldo15_reg: LDO15 {
+                               regulator-compatible = "LDO15";
+                               regulator-name = "VHSIC_1.0V";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-mem-off;
+                       };
+
+                       ldo16_reg: LDO16 {
+                               regulator-compatible = "LDO16";
+                               regulator-name = "VHSIC_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-mem-off;
+                       };
+
+                       ldo17_reg: LDO17 {
+                               regulator-compatible = "LDO17";
+                               regulator-name = "CAM_SENSOR_CORE_1.2V";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo18_reg: LDO18 {
+                               regulator-compatible = "LDO18";
+                               regulator-name = "CAM_ISP_SEN_IO_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo19_reg: LDO19 {
+                               regulator-compatible = "LDO19";
+                               regulator-name = "VT_CAM_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo20_reg: LDO20 {
+                               regulator-compatible = "LDO20";
+                               regulator-name = "VDDQ_PRE_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo21_reg: LDO21 {
+                               regulator-compatible = "LDO21";
+                               regulator-name = "VTF_2.8V";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo22_reg: LDO22 {
+                               regulator-compatible = "LDO22";
+                               regulator-name = "VMEM_VDD_2.8V";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-always-on;
+                               regulator-mem-off;
+                       };
+
+                       ldo23_reg: LDO23 {
+                               regulator-compatible = "LDO23";
+                               regulator-name = "TSP_AVDD_3.3V";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo24_reg: LDO24 {
+                               regulator-compatible = "LDO24";
+                               regulator-name = "TSP_VDD_1.8V";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo25_reg: LDO25 {
+                               regulator-compatible = "LDO25";
+                               regulator-name = "LCD_VCC_3.3V";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-mem-idle;
+                       };
+
+                       ldo26_reg: LDO26 {
+                               regulator-compatible = "LDO26";
+                               regulator-name = "MOTOR_VCC_3.0V";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-mem-idle;
+                       };
+
+                       buck1_reg: BUCK1 {
+                               regulator-compatible = "BUCK1";
+                               regulator-name = "vdd_mif";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1100000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-mem-off;
+                       };
+
+                       buck2_reg: BUCK2 {
+                               regulator-compatible = "BUCK2";
+                               regulator-name = "vdd_arm";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-mem-off;
+                       };
+
+                       buck3_reg: BUCK3 {
+                               regulator-compatible = "BUCK3";
+                               regulator-name = "vdd_int";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1150000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-mem-off;
+                       };
+
+                       buck4_reg: BUCK4 {
+                               regulator-compatible = "BUCK4";
+                               regulator-name = "vdd_g3d";
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1150000>;
+                               regulator-boot-on;
+                               regulator-mem-off;
+                       };
+
+                       buck5_reg: BUCK5 {
+                               regulator-compatible = "BUCK5";
+                               regulator-name = "VMEM_1.2V_AP";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-always-on;
+                       };
+
+                       buck6_reg: BUCK6 {
+                               regulator-compatible = "BUCK6";
+                               regulator-name = "VCC_SUB_1.35V";
+                               regulator-min-microvolt = <1350000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-always-on;
+                       };
+
+                       buck7_reg: BUCK7 {
+                               regulator-compatible = "BUCK7";
+                               regulator-name = "VCC_SUB_2.0V";
+                               regulator-min-microvolt = <2000000>;
+                               regulator-max-microvolt = <2000000>;
+                               regulator-always-on;
+                       };
+
+                       buck8_reg: BUCK8 {
+                               regulator-compatible = "BUCK8";
+                               regulator-name = "VMEM_VDDF_3.0V";
+                               regulator-min-microvolt = <2850000>;
+                               regulator-max-microvolt = <2850000>;
+                               regulator-always-on;
+                               regulator-mem-off;
+                       };
+
+                       buck9_reg: BUCK9 {
+                               regulator-compatible = "BUCK9";
+                               regulator-name = "CAM_ISP_CORE_1.2V";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-mem-off;
+                       };
+               };
+       };
+};
+
 &sdhci0 {
        samsung,bus-width = <8>;
        samsung,timing = <1 3 3>;
index 87b339c739de708beaf5d2ed818e3a424c8fcc7a..4a72385560b7307d4bb73464c680ae8ceda2248b 100644 (file)
 
 / {
        compatible = "samsung,exynos4412";
+};
 
-       gic: interrupt-controller@10490000 {
-               cpu-offset = <0x4000>;
-       };
-
-       interrupt-controller@10440000 {
-               samsung,combiner-nr = <20>;
-               interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
-                            <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
-                            <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
-                            <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>,
-                            <0 107 0>, <0 108 0>, <0 48 0>, <0 42 0>;
-       };
-
+&combiner {
+       samsung,combiner-nr = <20>;
+       interrupt-parent = <&gic>;
+       interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
+                    <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
+                    <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
+                    <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>,
+                    <0 107 0>, <0 108 0>, <0 48 0>, <0 42 0>;
 };
index b977288a74d38dbf0fc88d0b0b33759cd59203bf..ca4f3712dad30153e25d360abcbde99f423f0551 100644 (file)
        pinctrl_0: pinctrl@11400000 {
                compatible = "samsung,exynos4x12-pinctrl";
                reg = <0x11400000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 47 0>;
        };
 
        pinctrl_1: pinctrl@11000000 {
                compatible = "samsung,exynos4x12-pinctrl";
                reg = <0x11000000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 46 0>;
 
                wakup_eint: wakeup-interrupt-controller {
        pinctrl_3: pinctrl@106E0000 {
                compatible = "samsung,exynos4x12-pinctrl";
                reg = <0x106E0000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 72 0>;
        };
 
        g2d@10800000 {
                compatible = "samsung,exynos4212-g2d";
                reg = <0x10800000 0x1000>;
+               interrupt-parent = <&gic>;
                interrupts = <0 89 0>;
                clocks = <&clock 177>, <&clock 277>;
                clock-names = "sclk_fimg2d", "fimg2d";
diff --git a/arch/arm/dts/r8a77970-eagle.dts b/arch/arm/dts/r8a77970-eagle.dts
new file mode 100644 (file)
index 0000000..71a379f
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Device Tree Source for the Eagle board
+ *
+ * Copyright (C) 2016-2017 Renesas Electronics Corp.
+ * Copyright (C) 2017 Cogent Embedded, Inc.
+ *
+ * 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.
+ */
+
+/dts-v1/;
+#include "r8a77970.dtsi"
+
+/ {
+       model = "Renesas Eagle board based on r8a77970";
+       compatible = "renesas,eagle", "renesas,r8a77970";
+
+       aliases {
+               serial0 = &scif0;
+               ethernet0 = &avb;
+       };
+
+       chosen {
+               bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory@48000000 {
+               device_type = "memory";
+               /* first 128MB is reserved for secure area. */
+               reg = <0x0 0x48000000 0x0 0x38000000>;
+       };
+};
+
+&extal_clk {
+       clock-frequency = <16666666>;
+};
+
+&extalr_clk {
+       clock-frequency = <32768>;
+};
+
+&pfc {
+       pinctrl-0 = <&scif_clk_pins>;
+       pinctrl-names = "default";
+
+       scif0_pins: scif0 {
+               groups = "scif0_data";
+               function = "scif0";
+       };
+
+       scif_clk_pins: scif_clk {
+               groups = "scif_clk_b";
+               function = "scif_clk";
+       };
+
+       avb_pins: avb {
+               groups = "avb0_mdc";
+               function = "avb0";
+       };
+};
+
+&scif0 {
+       pinctrl-0 = <&scif0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&scif_clk {
+       clock-frequency = <14745600>;
+       status = "okay";
+};
+
+&avb {
+       pinctrl-0 = <&avb_pins>;
+       pinctrl-names = "default";
+       renesas,no-ether-link;
+       phy-handle = <&phy0>;
+       status = "okay";
+
+       phy0: ethernet-phy@0 {
+               rxc-skew-ps = <1500>;
+               reg = <0>;
+       };
+};
diff --git a/arch/arm/dts/r8a77970.dtsi b/arch/arm/dts/r8a77970.dtsi
new file mode 100644 (file)
index 0000000..15f4af1
--- /dev/null
@@ -0,0 +1,392 @@
+/*
+ * Device Tree Source for the r8a77970 SoC
+ *
+ * Copyright (C) 2016-2017 Renesas Electronics Corp.
+ * Copyright (C) 2017 Cogent Embedded, Inc.
+ *
+ * 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 <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/renesas-cpg-mssr.h>
+
+/ {
+       compatible = "renesas,r8a77970";
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       psci {
+               compatible = "arm,psci-1.0", "arm,psci-0.2";
+               method = "smc";
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               a53_0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0>;
+                       clocks = <&cpg CPG_CORE 0>;
+                       power-domains = <&sysc 5>;
+                       next-level-cache = <&L2_CA53>;
+                       enable-method = "psci";
+               };
+
+               L2_CA53: cache-controller {
+                       compatible = "cache";
+                       power-domains = <&sysc 21>;
+                       cache-unified;
+                       cache-level = <2>;
+               };
+       };
+
+       extal_clk: extal {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               /* This value must be overridden by the board */
+               clock-frequency = <0>;
+               u-boot,dm-pre-reloc;
+       };
+
+       extalr_clk: extalr {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               /* This value must be overridden by the board */
+               clock-frequency = <0>;
+               u-boot,dm-pre-reloc;
+       };
+
+       /* External SCIF clock - to be overridden by boards that provide it */
+       scif_clk: scif {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       soc {
+               compatible = "simple-bus";
+               interrupt-parent = <&gic>;
+
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+               u-boot,dm-pre-reloc;
+
+               gic: interrupt-controller@f1010000 {
+                       compatible = "arm,gic-400";
+                       #interrupt-cells = <3>;
+                       #address-cells = <0>;
+                       interrupt-controller;
+                       reg = <0 0xf1010000 0 0x1000>,
+                             <0 0xf1020000 0 0x20000>,
+                             <0 0xf1040000 0 0x20000>,
+                             <0 0xf1060000 0 0x20000>;
+                       interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(1) |
+                                     IRQ_TYPE_LEVEL_HIGH)>;
+                       clocks = <&cpg CPG_MOD 408>;
+                       clock-names = "clk";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 408>;
+               };
+
+               timer {
+                       compatible = "arm,armv8-timer";
+                       interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) |
+                                                 IRQ_TYPE_LEVEL_LOW)>,
+                                    <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) |
+                                                 IRQ_TYPE_LEVEL_LOW)>,
+                                    <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) |
+                                                 IRQ_TYPE_LEVEL_LOW)>,
+                                    <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) |
+                                                 IRQ_TYPE_LEVEL_LOW)>;
+               };
+
+               cpg: clock-controller@e6150000 {
+                       compatible = "renesas,r8a77970-cpg-mssr";
+                       reg = <0 0xe6150000 0 0x1000>;
+                       clocks = <&extal_clk>, <&extalr_clk>;
+                       clock-names = "extal", "extalr";
+                       #clock-cells = <2>;
+                       #power-domain-cells = <0>;
+                       #reset-cells = <1>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               rst: reset-controller@e6160000 {
+                       compatible = "renesas,r8a77970-rst";
+                       reg = <0 0xe6160000 0 0x200>;
+               };
+
+               sysc: system-controller@e6180000 {
+                       compatible = "renesas,r8a77970-sysc";
+                       reg = <0 0xe6180000 0 0x440>;
+                       #power-domain-cells = <1>;
+               };
+
+               pfc: pfc@e6060000 {
+                       compatible = "renesas,pfc-r8a77970";
+                       reg = <0 0xe6060000 0 0x50c>;
+               };
+
+               intc_ex: interrupt-controller@e61c0000 {
+                       compatible = "renesas,intc-ex-r8a77970", "renesas,irqc";
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       reg = <0 0xe61c0000 0 0x200>;
+                       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 407>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 407>;
+               };
+
+               prr: chipid@fff00044 {
+                       compatible = "renesas,prr";
+                       reg = <0 0xfff00044 0 4>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               dmac1: dma-controller@e7300000 {
+                       compatible = "renesas,dmac-r8a77970",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe7300000 0 0x10000>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                         "ch0", "ch1", "ch2", "ch3",
+                                         "ch4", "ch5", "ch6", "ch7";
+                       clocks = <&cpg CPG_MOD 218>;
+                       clock-names = "fck";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 218>;
+                       #dma-cells = <1>;
+                       dma-channels = <8>;
+               };
+
+               dmac2: dma-controller@e7310000 {
+                       compatible = "renesas,dmac-r8a77970",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe7310000 0 0x10000>;
+                       interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                         "ch0", "ch1", "ch2", "ch3",
+                                         "ch4", "ch5", "ch6", "ch7";
+                       clocks = <&cpg CPG_MOD 217>;
+                       clock-names = "fck";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 217>;
+                       #dma-cells = <1>;
+                       dma-channels = <8>;
+               };
+
+               hscif0: serial@e6540000 {
+                       compatible = "renesas,hscif-r8a77970",
+                                    "renesas,rcar-gen3-hscif",
+                                    "renesas,hscif";
+                       reg = <0 0xe6540000 0 96>;
+                       interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 520>,
+                                <&cpg CPG_CORE 9>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x31>, <&dmac1 0x30>,
+                              <&dmac2 0x31>, <&dmac2 0x30>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 520>;
+                       status = "disabled";
+               };
+
+               hscif1: serial@e6550000 {
+                       compatible = "renesas,hscif-r8a77970",
+                                    "renesas,rcar-gen3-hscif",
+                                    "renesas,hscif";
+                       reg = <0 0xe6550000 0 96>;
+                       interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 519>,
+                                <&cpg CPG_CORE 9>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x33>, <&dmac1 0x32>,
+                              <&dmac2 0x33>, <&dmac2 0x32>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 519>;
+                       status = "disabled";
+               };
+
+               hscif2: serial@e6560000 {
+                       compatible = "renesas,hscif-r8a77970",
+                                    "renesas,rcar-gen3-hscif",
+                                    "renesas,hscif";
+                       reg = <0 0xe6560000 0 96>;
+                       interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 518>,
+                                <&cpg CPG_CORE 9>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x35>, <&dmac1 0x34>,
+                              <&dmac2 0x35>, <&dmac2 0x34>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 518>;
+                       status = "disabled";
+               };
+
+               hscif3: serial@e66a0000 {
+                       compatible = "renesas,hscif-r8a77970",
+                                    "renesas,rcar-gen3-hscif", "renesas,hscif";
+                       reg = <0 0xe66a0000 0 96>;
+                       interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 517>,
+                                <&cpg CPG_CORE 9>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x37>, <&dmac1 0x36>,
+                              <&dmac2 0x37>, <&dmac2 0x36>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 517>;
+                       status = "disabled";
+               };
+
+               scif0: serial@e6e60000 {
+                       compatible = "renesas,scif-r8a77970",
+                                    "renesas,rcar-gen3-scif",
+                                    "renesas,scif";
+                       reg = <0 0xe6e60000 0 64>;
+                       interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 207>,
+                                <&cpg CPG_CORE 9>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x51>, <&dmac1 0x50>,
+                              <&dmac2 0x51>, <&dmac2 0x50>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 207>;
+                       status = "disabled";
+               };
+
+               scif1: serial@e6e68000 {
+                       compatible = "renesas,scif-r8a77970",
+                                    "renesas,rcar-gen3-scif",
+                                    "renesas,scif";
+                       reg = <0 0xe6e68000 0 64>;
+                       interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 206>,
+                                <&cpg CPG_CORE 9>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x53>, <&dmac1 0x52>,
+                              <&dmac2 0x53>, <&dmac2 0x52>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 206>;
+                       status = "disabled";
+               };
+
+               scif3: serial@e6c50000 {
+                       compatible = "renesas,scif-r8a77970",
+                                    "renesas,rcar-gen3-scif",
+                                    "renesas,scif";
+                       reg = <0 0xe6c50000 0 64>;
+                       interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 204>,
+                                <&cpg CPG_CORE 9>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x57>, <&dmac1 0x56>,
+                              <&dmac2 0x57>, <&dmac2 0x56>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 204>;
+                       status = "disabled";
+               };
+
+               scif4: serial@e6c40000 {
+                       compatible = "renesas,scif-r8a77970",
+                                    "renesas,rcar-gen3-scif", "renesas,scif";
+                       reg = <0 0xe6c40000 0 64>;
+                       interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 203>,
+                                <&cpg CPG_CORE 9>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x59>, <&dmac1 0x58>,
+                              <&dmac2 0x59>, <&dmac2 0x58>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 203>;
+                       status = "disabled";
+               };
+
+               avb: ethernet@e6800000 {
+                       compatible = "renesas,etheravb-r8a77970",
+                                    "renesas,etheravb-rcar-gen3";
+                       reg = <0 0xe6800000 0 0x800>, <0 0xe6a00000 0 0x10000>;
+                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1", "ch2", "ch3",
+                                         "ch4", "ch5", "ch6", "ch7",
+                                         "ch8", "ch9", "ch10", "ch11",
+                                         "ch12", "ch13", "ch14", "ch15",
+                                         "ch16", "ch17", "ch18", "ch19",
+                                         "ch20", "ch21", "ch22", "ch23",
+                                         "ch24";
+                       clocks = <&cpg CPG_MOD 812>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 812>;
+                       phy-mode = "rgmii-id";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+       };
+};
diff --git a/arch/arm/dts/r8a77995-draak.dts b/arch/arm/dts/r8a77995-draak.dts
new file mode 100644 (file)
index 0000000..09de73b
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * Device Tree Source for the Draak board
+ *
+ * Copyright (C) 2016 Renesas Electronics Corp.
+ * Copyright (C) 2017 Glider bvba
+ *
+ * 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.
+ */
+
+/dts-v1/;
+#include "r8a77995.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "Renesas Draak board based on r8a77995";
+       compatible = "renesas,draak", "renesas,r8a77995";
+
+       aliases {
+               serial0 = &scif2;
+               ethernet0 = &avb;
+       };
+
+       chosen {
+               bootargs = "ignore_loglevel";
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory@48000000 {
+               device_type = "memory";
+               /* first 128MB is reserved for secure area. */
+               reg = <0x0 0x48000000 0x0 0x18000000>;
+       };
+};
+
+&extal_clk {
+       clock-frequency = <48000000>;
+};
+
+&pfc {
+       avb0_pins: avb {
+               mux {
+                       groups = "avb0_link", "avb0_mdc", "avb0_mii";
+                       function = "avb0";
+               };
+       };
+
+       pwm0_pins: pwm0 {
+               groups = "pwm0_c";
+               function = "pwm0";
+       };
+
+       pwm1_pins: pwm1 {
+               groups = "pwm1_c";
+               function = "pwm1";
+       };
+
+       scif2_pins: scif2 {
+               groups = "scif2_data";
+               function = "scif2";
+       };
+
+       usb0_pins: usb0 {
+               groups = "usb0";
+               function = "usb0";
+       };
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&avb {
+       pinctrl-0 = <&avb0_pins>;
+       pinctrl-names = "default";
+       renesas,no-ether-link;
+       phy-handle = <&phy0>;
+       status = "okay";
+
+       phy0: ethernet-phy@0 {
+               rxc-skew-ps = <1500>;
+               reg = <0>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+&scif2 {
+       pinctrl-0 = <&scif2_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&usb2_phy0 {
+       pinctrl-0 = <&usb0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&pwm0 {
+       pinctrl-0 = <&pwm0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&pwm1 {
+       pinctrl-0 = <&pwm1_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&rwdt {
+       timeout-sec = <60>;
+       status = "okay";
+};
diff --git a/arch/arm/dts/r8a77995.dtsi b/arch/arm/dts/r8a77995.dtsi
new file mode 100644 (file)
index 0000000..940e962
--- /dev/null
@@ -0,0 +1,410 @@
+/*
+ * Device Tree Source for the r8a77995 SoC
+ *
+ * Copyright (C) 2016 Renesas Electronics Corp.
+ * Copyright (C) 2017 Glider bvba
+ *
+ * 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 <dt-bindings/clock/r8a77995-cpg-mssr.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/r8a77995-sysc.h>
+
+/ {
+       compatible = "renesas,r8a77995";
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       psci {
+               compatible = "arm,psci-1.0", "arm,psci-0.2";
+               method = "smc";
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               a53_0: cpu@0 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x0>;
+                       device_type = "cpu";
+                       power-domains = <&sysc R8A77995_PD_CA53_CPU0>;
+                       next-level-cache = <&L2_CA53>;
+                       enable-method = "psci";
+               };
+
+               L2_CA53: cache-controller-1 {
+                       compatible = "cache";
+                       power-domains = <&sysc R8A77995_PD_CA53_SCU>;
+                       cache-unified;
+                       cache-level = <2>;
+               };
+       };
+
+       extal_clk: extal {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               /* This value must be overridden by the board */
+               clock-frequency = <0>;
+               u-boot,dm-pre-reloc;
+       };
+
+       scif_clk: scif {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       soc {
+               compatible = "simple-bus";
+               interrupt-parent = <&gic>;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+               u-boot,dm-pre-reloc;
+
+               gic: interrupt-controller@f1010000 {
+                       compatible = "arm,gic-400";
+                       #interrupt-cells = <3>;
+                       #address-cells = <0>;
+                       interrupt-controller;
+                       reg = <0x0 0xf1010000 0 0x1000>,
+                             <0x0 0xf1020000 0 0x20000>,
+                             <0x0 0xf1040000 0 0x20000>,
+                             <0x0 0xf1060000 0 0x20000>;
+                       interrupts = <GIC_PPI 9
+                                       (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_HIGH)>;
+                       clocks = <&cpg CPG_MOD 408>;
+                       clock-names = "clk";
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 408>;
+               };
+
+               timer {
+                       compatible = "arm,armv8-timer";
+                       interrupts = <GIC_PPI 13
+                                       (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
+                                    <GIC_PPI 14
+                                       (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
+                                    <GIC_PPI 11
+                                       (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
+                                    <GIC_PPI 10
+                                       (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>;
+               };
+
+               rwdt: watchdog@e6020000 {
+                       compatible = "renesas,r8a77995-wdt",
+                                    "renesas,rcar-gen3-wdt";
+                       reg = <0 0xe6020000 0 0x0c>;
+                       clocks = <&cpg CPG_MOD 402>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 402>;
+                       status = "disabled";
+               };
+
+               pmu_a53 {
+                       compatible = "arm,cortex-a53-pmu";
+                       interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               cpg: clock-controller@e6150000 {
+                       compatible = "renesas,r8a77995-cpg-mssr";
+                       reg = <0 0xe6150000 0 0x1000>;
+                       clocks = <&extal_clk>;
+                       clock-names = "extal";
+                       #clock-cells = <2>;
+                       #power-domain-cells = <0>;
+                       #reset-cells = <1>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               rst: reset-controller@e6160000 {
+                       compatible = "renesas,r8a77995-rst";
+                       reg = <0 0xe6160000 0 0x0200>;
+               };
+
+               pfc: pin-controller@e6060000 {
+                       compatible = "renesas,pfc-r8a77995";
+                       reg = <0 0xe6060000 0 0x508>;
+               };
+
+               prr: chipid@fff00044 {
+                       compatible = "renesas,prr";
+                       reg = <0 0xfff00044 0 4>;
+                       u-boot,dm-pre-reloc;
+               };
+
+               sysc: system-controller@e6180000 {
+                       compatible = "renesas,r8a77995-sysc";
+                       reg = <0 0xe6180000 0 0x0400>;
+                       #power-domain-cells = <1>;
+               };
+
+               intc_ex: interrupt-controller@e61c0000 {
+                       compatible = "renesas,intc-ex-r8a77995", "renesas,irqc";
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       reg = <0 0xe61c0000 0 0x200>;
+                       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 407>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 407>;
+               };
+
+               gpio0: gpio@e6050000 {
+                       compatible = "renesas,gpio-r8a77995",
+                                    "renesas,rcar-gen3-gpio",
+                                    "renesas,gpio-rcar";
+                       reg = <0 0xe6050000 0 0x50>;
+                       interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 0 9>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 912>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 912>;
+               };
+
+               gpio1: gpio@e6051000 {
+                       compatible = "renesas,gpio-r8a77995",
+                                    "renesas,rcar-gen3-gpio",
+                                    "renesas,gpio-rcar";
+                       reg = <0 0xe6051000 0 0x50>;
+                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 32 32>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 911>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 911>;
+               };
+
+               gpio2: gpio@e6052000 {
+                       compatible = "renesas,gpio-r8a77995",
+                                    "renesas,rcar-gen3-gpio",
+                                    "renesas,gpio-rcar";
+                       reg = <0 0xe6052000 0 0x50>;
+                       interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 64 32>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 910>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 910>;
+               };
+
+               gpio3: gpio@e6053000 {
+                       compatible = "renesas,gpio-r8a77995",
+                                    "renesas,rcar-gen3-gpio",
+                                    "renesas,gpio-rcar";
+                       reg = <0 0xe6053000 0 0x50>;
+                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 96 10>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 909>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 909>;
+               };
+
+               gpio4: gpio@e6054000 {
+                       compatible = "renesas,gpio-r8a77995",
+                                    "renesas,rcar-gen3-gpio",
+                                    "renesas,gpio-rcar";
+                       reg = <0 0xe6054000 0 0x50>;
+                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 128 32>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 908>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 908>;
+               };
+
+               gpio5: gpio@e6055000 {
+                       compatible = "renesas,gpio-r8a77995",
+                                    "renesas,rcar-gen3-gpio",
+                                    "renesas,gpio-rcar";
+                       reg = <0 0xe6055000 0 0x50>;
+                       interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 160 21>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 907>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 907>;
+               };
+
+               gpio6: gpio@e6055400 {
+                       compatible = "renesas,gpio-r8a77995",
+                                    "renesas,rcar-gen3-gpio",
+                                    "renesas,gpio-rcar";
+                       reg = <0 0xe6055400 0 0x50>;
+                       interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 192 14>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 906>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 906>;
+               };
+
+               avb: ethernet@e6800000 {
+                       compatible = "renesas,etheravb-r8a77995",
+                                    "renesas,etheravb-rcar-gen3";
+                       reg = <0 0xe6800000 0 0x800>, <0 0xe6a00000 0 0x10000>;
+                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1", "ch2", "ch3",
+                                         "ch4", "ch5", "ch6", "ch7",
+                                         "ch8", "ch9", "ch10", "ch11",
+                                         "ch12", "ch13", "ch14", "ch15",
+                                         "ch16", "ch17", "ch18", "ch19",
+                                         "ch20", "ch21", "ch22", "ch23",
+                                         "ch24";
+                       clocks = <&cpg CPG_MOD 812>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 812>;
+                       phy-mode = "rgmii-txid";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               scif2: serial@e6e88000 {
+                       compatible = "renesas,scif-r8a77995",
+                                    "renesas,rcar-gen3-scif", "renesas,scif";
+                       reg = <0 0xe6e88000 0 64>;
+                       interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 310>,
+                                <&cpg CPG_CORE R8A77995_CLK_S3D1C>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 310>;
+                       status = "disabled";
+               };
+
+               pwm0: pwm@e6e30000 {
+                       compatible = "renesas,pwm-r8a77995", "renesas,pwm-rcar";
+                       reg = <0 0xe6e30000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       status = "disabled";
+               };
+
+               pwm1: pwm@e6e31000 {
+                       compatible = "renesas,pwm-r8a77995", "renesas,pwm-rcar";
+                       reg = <0 0xe6e31000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       status = "disabled";
+               };
+
+               pwm2: pwm@e6e32000 {
+                       compatible = "renesas,pwm-r8a77995", "renesas,pwm-rcar";
+                       reg = <0 0xe6e32000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       status = "disabled";
+               };
+
+               pwm3: pwm@e6e33000 {
+                       compatible = "renesas,pwm-r8a77995", "renesas,pwm-rcar";
+                       reg = <0 0xe6e33000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       status = "disabled";
+               };
+
+               ehci0: usb@ee080100 {
+                       compatible = "generic-ehci";
+                       reg = <0 0xee080100 0 0x100>;
+                       interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 703>;
+                       phys = <&usb2_phy0>;
+                       phy-names = "usb";
+                       companion = <&ohci0>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 703>;
+                       status = "disabled";
+               };
+
+               ohci0: usb@ee080000 {
+                       compatible = "generic-ohci";
+                       reg = <0 0xee080000 0 0x100>;
+                       interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 703>;
+                       phys = <&usb2_phy0>;
+                       phy-names = "usb";
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 703>;
+                       status = "disabled";
+               };
+
+               usb2_phy0: usb-phy@ee080200 {
+                       compatible = "renesas,usb2-phy-r8a77995",
+                                    "renesas,rcar-gen3-usb2-phy";
+                       reg = <0 0xee080200 0 0x700>;
+                       interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 703>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 703>;
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+       };
+};
index ff0fc47021efd54b805056abf85f01d52e4e5732..940461137eb455ccee63c735957fdc19ed08f1d8 100644 (file)
@@ -80,8 +80,6 @@
 
 /* SATA */
 #define AHCI_BASE_ADDR                         (CONFIG_SYS_IMMR + 0x02200000)
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
index e671c143ac11590c901e94fe7df7704f479d16e1..6d0023d7b8650d27f80e2240d613c57c96506b82 100644 (file)
 
 #endif
 
-
-/*
- * Implementation specifics
- */
-
-#ifdef CONFIG_ARCH_LUBBOCK
-#include "lubbock.h"
-#endif
-
-#ifdef CONFIG_ARCH_PXA_IDP
-#include "idp.h"
-#endif
-
-#ifdef CONFIG_ARCH_PXA_CERF
-#include "cerf.h"
-#endif
-
-#ifdef CONFIG_ARCH_CSB226
-#include "csb226.h"
-#endif
-
-#ifdef CONFIG_ARCH_INNOKOM
-#include "innokom.h"
-#endif
-
-#ifdef CONFIG_ARCH_PLEB
-#include "pleb.h"
-#endif
-
 #endif /* _ASM_ARCH_HARDWARE_H */
index ba6007186e7606ea43b8930cb144e7f44fb90084..efa4e7b6e24250222a860738f85d81381bce11c6 100644 (file)
@@ -97,7 +97,6 @@
  */
 #ifdef CONFIG_IDE
 #define __io
-#define CONFIG_MVSATA_IDE
 #define CONFIG_IDE_PREINIT
 #define CONFIG_MVSATA_IDE_USE_PORT1
 /* Needs byte-swapping for ATA data register */
index c79b39ded69ac5a29671bd4ecb99a45102d05e06..6112d79f0d7d17edf47caa291feda1614a2c28d4 100644 (file)
@@ -9,12 +9,28 @@ config R8A7795
 config R8A7796
        bool "Renesas SoC R8A7796"
 
+config R8A77970
+       bool "Renesas SoC R8A77970"
+
+config R8A77995
+       bool "Renesas SoC R8A77995"
+
 endchoice
 
 choice
        prompt "Renesus ARM64 SoCs board select"
        optional
 
+config TARGET_DRAAK
+       bool "Draak board"
+       help
+          Support for Renesas R-Car Gen3 Draak platform
+
+config TARGET_EAGLE
+       bool "Eagle board"
+       help
+          Support for Renesas R-Car Gen3 Eagle platform
+
 config TARGET_SALVATOR_X
        bool "Salvator-X board"
        help
@@ -30,6 +46,8 @@ endchoice
 config SYS_SOC
        default "rmobile"
 
+source "board/renesas/draak/Kconfig"
+source "board/renesas/eagle/Kconfig"
 source "board/renesas/salvator-x/Kconfig"
 source "board/renesas/ulcb/Kconfig"
 
index 5c8cb3f666aaa898a2716d694ee88e2c4eb18bc8..ad9f86c5b8d3a3ad65c7886ed94a5ac6e3b72f81 100644 (file)
@@ -61,6 +61,8 @@ static const struct {
        { RMOBILE_CPU_TYPE_R8A7794, "R8A7794" },
        { RMOBILE_CPU_TYPE_R8A7795, "R8A7795" },
        { RMOBILE_CPU_TYPE_R8A7796, "R8A7796" },
+       { RMOBILE_CPU_TYPE_R8A77970, "R8A77970" },
+       { RMOBILE_CPU_TYPE_R8A77995, "R8A77995" },
        { 0x0, "CPU" },
 };
 
index b413859a4d0554aa1f29caf6c2381ecede278b9d..f4db42c34b4420fa9f9bd88f1fd682b5d8408a88 100644 (file)
@@ -33,6 +33,8 @@
 #define RMOBILE_CPU_TYPE_R8A7794       0x4C
 #define RMOBILE_CPU_TYPE_R8A7795       0x4F
 #define RMOBILE_CPU_TYPE_R8A7796       0x52
+#define RMOBILE_CPU_TYPE_R8A77970      0x54
+#define RMOBILE_CPU_TYPE_R8A77995      0x58
 
 #ifndef __ASSEMBLY__
 u32 rmobile_get_cpu_type(void);
index f3156ab01a861abbba0039e5c45d2f79d4e806bd..199c2c2aea8db1e412b7fa29ac1eb8180e6a9543 100644 (file)
@@ -49,6 +49,46 @@ static struct mm_region r8a7796_mem_map[] = {
        }
 };
 
+static struct mm_region r8a77970_mem_map[] = {
+       {
+               .virt = 0x0UL,
+               .phys = 0x0UL,
+               .size = 0xe0000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+                        PTE_BLOCK_INNER_SHARE
+       }, {
+               .virt = 0xe0000000UL,
+               .phys = 0xe0000000UL,
+               .size = 0xe0000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+                        PTE_BLOCK_NON_SHARE |
+                        PTE_BLOCK_PXN | PTE_BLOCK_UXN
+       }, {
+               /* List terminator */
+               0,
+       }
+};
+
+static struct mm_region r8a77995_mem_map[] = {
+       {
+               .virt = 0x0UL,
+               .phys = 0x0UL,
+               .size = 0xe0000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+                        PTE_BLOCK_INNER_SHARE
+       }, {
+               .virt = 0xe0000000UL,
+               .phys = 0xe0000000UL,
+               .size = 0xe0000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+                        PTE_BLOCK_NON_SHARE |
+                        PTE_BLOCK_PXN | PTE_BLOCK_UXN
+       }, {
+               /* List terminator */
+               0,
+       }
+};
+
 struct mm_region *mem_map = r8a7795_mem_map;
 
 void rcar_gen3_memmap_fixup(void)
@@ -62,5 +102,11 @@ void rcar_gen3_memmap_fixup(void)
        case RMOBILE_CPU_TYPE_R8A7796:
                mem_map = r8a7796_mem_map;
                break;
+       case RMOBILE_CPU_TYPE_R8A77970:
+               mem_map = r8a77970_mem_map;
+               break;
+       case RMOBILE_CPU_TYPE_R8A77995:
+               mem_map = r8a77995_mem_map;
+               break;
        }
 }
index 76633bcd498a0ebbd981316955c082d538779574..5cd0897dffb338fb627d5c2b00bdd633eecd1a8f 100644 (file)
@@ -27,3 +27,4 @@ endif
 
 obj-$(CONFIG_ARCH_UNIPHIER_LD11)       += pll-base-ld20.o
 obj-$(CONFIG_ARCH_UNIPHIER_LD20)       += pll-base-ld20.o
+obj-$(CONFIG_ARCH_UNIPHIER_PXS3)       += pll-base-ld20.o
index 3aa42f8bfdcd9909e3aae3cc5bf8f31aeba94775..385f54dfc3b9941fcacabd62fc283f9c011d4e95 100644 (file)
@@ -5,8 +5,10 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
+#include <linux/bitfield.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
+#include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
@@ -18,7 +20,6 @@
 #define SC_PLLCTRL_SSC_EN              BIT(31)
 #define SC_PLLCTRL2_NRSTDS             BIT(28)
 #define SC_PLLCTRL2_SSC_JK_MASK                GENMASK(26, 0)
-#define SC_PLLCTRL3_REGI_SHIFT         16
 #define SC_PLLCTRL3_REGI_MASK          GENMASK(19, 16)
 
 /* PLL type: VPLL27 */
@@ -41,13 +42,17 @@ int uniphier_ld20_sscpll_init(unsigned long reg_base, unsigned int freq,
        if (freq != UNIPHIER_PLL_FREQ_DEFAULT) {
                tmp = readl(base);      /* SSCPLLCTRL */
                tmp &= ~SC_PLLCTRL_SSC_DK_MASK;
-               tmp |= (487 * freq * ssc_rate / divn / 512) &
-                                                       SC_PLLCTRL_SSC_DK_MASK;
+               tmp |= FIELD_PREP(SC_PLLCTRL_SSC_DK_MASK,
+                                 DIV_ROUND_CLOSEST(487UL * freq * ssc_rate,
+                                                   divn * 512));
                writel(tmp, base);
 
                tmp = readl(base + 4);
                tmp &= ~SC_PLLCTRL2_SSC_JK_MASK;
-               tmp |= (41859 * freq / divn) & SC_PLLCTRL2_SSC_JK_MASK;
+               tmp |= FIELD_PREP(SC_PLLCTRL2_SSC_JK_MASK,
+                                 DIV_ROUND_CLOSEST(21431887UL * freq,
+                                                   divn * 512));
+               writel(tmp, base + 4);
 
                udelay(50);
        }
@@ -90,7 +95,7 @@ int uniphier_ld20_sscpll_set_regi(unsigned long reg_base, unsigned regi)
 
        tmp = readl(base + 8);  /* SSCPLLCTRL3 */
        tmp &= ~SC_PLLCTRL3_REGI_MASK;
-       tmp |= regi << SC_PLLCTRL3_REGI_SHIFT;
+       tmp |= FIELD_PREP(SC_PLLCTRL3_REGI_MASK, regi);
        writel(tmp, base + 8);
 
        iounmap(base);
index a3779734c1abc5e41d252d8ccee2b2374a558f11..05d29d2fd95f086eea75c9e7360bd829039f55ca 100644 (file)
@@ -55,6 +55,7 @@ config TARGET_MPC837XEMDS
        bool "Support MPC837XEMDS"
        select BOARD_EARLY_INIT_F
        imply CMD_SATA
+       imply FSL_SATA
 
 config TARGET_MPC837XERDB
        bool "Support MPC837XERDB"
index 92187d371be39f0dfbb16ace7577cc3352f1c8cc..5df8175f1ed6a08bb0f4c3e346eb820316568f66 100644 (file)
@@ -92,6 +92,7 @@ config TARGET_MPC8536DS
 # Use DDR3 controller with DDR2 DIMMs on this board
        select SYS_FSL_DDRC_GEN3
        imply CMD_SATA
+       imply FSL_SATA
 
 config TARGET_MPC8541CDS
        bool "Support MPC8541CDS"
@@ -148,6 +149,7 @@ config TARGET_P1022DS
        select SUPPORT_SPL
        select SUPPORT_TPL
        imply CMD_SATA
+       imply FSL_SATA
 
 config TARGET_P1023RDB
        bool "Support P1023RDB"
@@ -209,6 +211,7 @@ config TARGET_P1025RDB
        select ARCH_P1025
        imply CMD_EEPROM
        imply CMD_SATA
+       imply SATA_SIL
 
 config TARGET_P2020RDB
        bool "Support P2020RDB-PC"
@@ -217,6 +220,7 @@ config TARGET_P2020RDB
        select ARCH_P2020
        imply CMD_EEPROM
        imply CMD_SATA
+       imply SATA_SIL
 
 config TARGET_P1_TWR
        bool "Support p1_twr"
@@ -228,6 +232,7 @@ config TARGET_P2041RDB
        select BOARD_LATE_INIT if CHAIN_OF_TRUST
        select PHYS_64BIT
        imply CMD_SATA
+       imply FSL_SATA
 
 config TARGET_QEMU_PPCE500
        bool "Support qemu-ppce500"
@@ -242,6 +247,7 @@ config TARGET_T1024QDS
        select PHYS_64BIT
        imply CMD_EEPROM
        imply CMD_SATA
+       imply FSL_SATA
 
 config TARGET_T1023RDB
        bool "Support T1023RDB"
@@ -640,6 +646,7 @@ config ARCH_P1010
        imply CMD_SATA
        imply CMD_PCI
        imply CMD_REGINFO
+       imply FSL_SATA
 
 config ARCH_P1011
        bool
@@ -672,6 +679,7 @@ config ARCH_P1020
        imply CMD_SATA
        imply CMD_PCI
        imply CMD_REGINFO
+       imply SATA_SIL
 
 config ARCH_P1021
        bool
@@ -690,6 +698,7 @@ config ARCH_P1021
        imply CMD_NAND
        imply CMD_SATA
        imply CMD_REGINFO
+       imply SATA_SIL
 
 config ARCH_P1022
        bool
@@ -737,6 +746,7 @@ config ARCH_P1024
        imply CMD_SATA
        imply CMD_PCI
        imply CMD_REGINFO
+       imply SATA_SIL
 
 config ARCH_P1025
        bool
@@ -821,6 +831,7 @@ config ARCH_P3041
        imply CMD_NAND
        imply CMD_SATA
        imply CMD_REGINFO
+       imply FSL_SATA
 
 config ARCH_P4080
        bool
@@ -858,6 +869,7 @@ config ARCH_P4080
        select FSL_ELBC
        imply CMD_SATA
        imply CMD_REGINFO
+       imply SATA_SIL
 
 config ARCH_P5020
        bool
@@ -881,6 +893,7 @@ config ARCH_P5020
        select FSL_ELBC
        imply CMD_SATA
        imply CMD_REGINFO
+       imply FSL_SATA
 
 config ARCH_P5040
        bool
@@ -904,6 +917,7 @@ config ARCH_P5040
        select FSL_ELBC
        imply CMD_SATA
        imply CMD_REGINFO
+       imply FSL_SATA
 
 config ARCH_QEMU_E500
        bool
@@ -970,6 +984,7 @@ config ARCH_T1040
        imply CMD_NAND
        imply CMD_SATA
        imply CMD_REGINFO
+       imply FSL_SATA
 
 config ARCH_T1042
        bool
@@ -992,6 +1007,7 @@ config ARCH_T1042
        imply CMD_NAND
        imply CMD_SATA
        imply CMD_REGINFO
+       imply FSL_SATA
 
 config ARCH_T2080
        bool
@@ -1017,6 +1033,7 @@ config ARCH_T2080
        imply CMD_SATA
        imply CMD_NAND
        imply CMD_REGINFO
+       imply FSL_SATA
 
 config ARCH_T2081
        bool
@@ -1063,6 +1080,7 @@ config ARCH_T4160
        imply CMD_SATA
        imply CMD_NAND
        imply CMD_REGINFO
+       imply FSL_SATA
 
 config ARCH_T4240
        bool
@@ -1090,6 +1108,7 @@ config ARCH_T4240
        imply CMD_SATA
        imply CMD_NAND
        imply CMD_REGINFO
+       imply FSL_SATA
 
 config BOOKE
        bool
index 1d876b19275ff6c990f52b2990958e2df3e391c9..f47bedaf8dc8c0de9dd7ae28eeb8ff86e0107818 100644 (file)
@@ -19,6 +19,7 @@ config INTEL_BAYTRAIL
        imply MMC_SDHCI
        imply MMC_SDHCI_SDMA
        imply SCSI
+       imply SCSI_AHCI
        imply SPI_FLASH
        imply SYS_NS16550
        imply USB
index 31ac279c568e5f3eb8a45bb0e0824a4c4650957f..042ad2bf5156db01be9566eb3a41fd9a5c3c9a4a 100644 (file)
@@ -19,6 +19,7 @@ config INTEL_BRASWELL
        imply MMC_SDHCI
        imply MMC_SDHCI_SDMA
        imply SCSI
+       imply SCSI_AHCI
        imply SPI_FLASH
        imply SYS_NS16550
        imply USB
index bc2dba2bd7c816629880dbbed40d9180c890eb99..42018dc127792f224069e7ca9c450dc8484a65aa 100644 (file)
@@ -13,6 +13,7 @@ config INTEL_BROADWELL
        imply ICH_SPI
        imply INTEL_BROADWELL_GPIO
        imply SCSI
+       imply SCSI_AHCI
        imply SPI_FLASH
        imply USB
        imply USB_EHCI_HCD
index 60eb45f9d0ab00f9f49fed8bbc47a5c05b27a2c3..fa3b64f2bb8e725543d62726dc6b5e6bf28a0a3c 100644 (file)
@@ -10,6 +10,7 @@ config SYS_COREBOOT
        imply MMC_PCI
        imply MMC_SDHCI
        imply MMC_SDHCI_SDMA
+       imply SCSI_AHCI
        imply SPI_FLASH
        imply SYS_NS16550
        imply USB
index c214ea0efe0931485a9a128b2833b0237b740523..85ea6c91f34f277aceb94b7d5f35067b576d1ea5 100644 (file)
@@ -14,6 +14,7 @@ config NORTHBRIDGE_INTEL_IVYBRIDGE
        imply ICH_SPI
        imply INTEL_ICH6_GPIO
        imply SCSI
+       imply SCSI_AHCI
        imply SPI_FLASH
        imply USB
        imply USB_EHCI_HCD
index 81444f3d9e1da628ab9083e269de0c87f1d5fd00..0a801aabeadb2f115bcc9c536a0a9d88d9dba7fd 100644 (file)
@@ -9,6 +9,7 @@ config QEMU
        select ARCH_EARLY_INIT_R
        imply AHCI_PCI
        imply E1000
+       imply SCSI_AHCI
        imply SYS_NS16550
        imply USB
        imply USB_EHCI_HCD
index 835de85268dd4c1612b481b4050a26e3bcfc1622..460ede00bc539226030bd0df79214a59a0f3d1b3 100644 (file)
@@ -18,6 +18,7 @@ config INTEL_QUEENSBAY
        imply MMC_SDHCI_SDMA
        imply PCH_GBE
        imply SCSI
+       imply SCSI_AHCI
        imply SPI_FLASH
        imply SYS_NS16550
        imply USB
index 06b3998ac055b2ee9f038ee4cb7baffd5931206d..b77b3d63dbb8a3a932797518db2f9abaece14951 100644 (file)
@@ -17,3 +17,46 @@ This step is optional, but should you want to change the default to the SOM-LV,
   make distclean
   make omap3_logic_defconfig
 
+Falcon Mode: FAT SD cards
+=========================
+
+In this case the additional file is written to the filesystem.  In this
+example we assume that the uImage and device tree to be used are already on
+the FAT filesystem (only the uImage MUST be for this to function
+afterwards) along with a Falcon Mode aware MLO and the FAT partition has
+already been created and marked bootable:
+
+U-Boot # mmc rescan
+# Load kernel and device tree into memory, perform export
+U-Boot # fatload mmc 0 ${loadaddr} uImage
+U-Boot # run loadfdt
+U-Boot # setenv optargs quiet
+U-Boot # run mmcargs
+U-Boot # run common_bootargs
+U-Boot # spl export fdt ${loadaddr} - ${fdtaddr}
+
+This will print a number of lines and then end with something like:
+   Loading Device Tree to 8dec9000, end 8dee0295 ... OK
+
+So then note the starting address and write the args to mmc/sd:
+
+U-Boot # fatwrite mmc 0:1 0x8dec9000 args 0x20000
+
+The size of 0x20000 matches the CMD_SPL_WRITE_SIZE.
+
+Falcon Mode: NAND
+=================
+
+In this case the additional data is written to another partition of the
+NAND.  In this example we assume that the uImage and device tree to be are
+already located on the NAND somewhere (such as filesystem or mtd partition)
+along with a Falcon Mode aware MLO written to the correct locations for
+booting and mtdparts have been configured correctly for the board:
+
+U-Boot # nand read ${loadaddr} kernel
+U-Boot # load nand rootfs ${fdtaddr} /boot/am335x-evm.dtb
+U-Boot # run nandargs
+U-Boot # run common_bootargs
+U-Boot # spl export fdt ${loadaddr} - ${fdtaddr}
+U-Boot # nand erase.part u-boot-spl-os
+U-Boot # nand write ${fdtaddr} u-boot-spl-os
index a55a520e63e512a69f237599b6311766feb69078..b30fa24a322d6d77714fc16ad44c61ec3f2983d3 100644 (file)
@@ -114,6 +114,47 @@ void get_board_mem_timings(struct board_sdrc_timings *timings)
        timings->ctrlb = MICRON_V_ACTIMB_200;
        timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
 }
+
+#define GPMC_NAND_COMMAND_0 (OMAP34XX_GPMC_BASE + 0x7c)
+#define GPMC_NAND_DATA_0 (OMAP34XX_GPMC_BASE + 0x84)
+#define GPMC_NAND_ADDRESS_0 (OMAP34XX_GPMC_BASE + 0x80)
+
+void spl_board_prepare_for_linux(void)
+{
+       /* The Micron NAND starts locked which
+        * prohibits mounting the NAND as RW
+        * The following commands are what unlocks
+        * the NAND to become RW Falcon Mode does not
+        * have as many smarts as U-Boot, but Logic PD
+        * only makes NAND with 512MB so these hard coded
+        * values should work for all current models
+        */
+
+       writeb(0x70, GPMC_NAND_COMMAND_0);
+       writeb(-1, GPMC_NAND_DATA_0);
+       writeb(0x7a, GPMC_NAND_COMMAND_0);
+       writeb(0x00, GPMC_NAND_ADDRESS_0);
+       writeb(0x00, GPMC_NAND_ADDRESS_0);
+       writeb(0x00, GPMC_NAND_ADDRESS_0);
+       writeb(-1, GPMC_NAND_COMMAND_0);
+
+       /* Begin address 0 */
+       writeb(NAND_CMD_UNLOCK1, 0x6e00007c);
+       writeb(0x00, GPMC_NAND_ADDRESS_0);
+       writeb(0x00, GPMC_NAND_ADDRESS_0);
+       writeb(0x00, GPMC_NAND_ADDRESS_0);
+       writeb(-1, GPMC_NAND_DATA_0);
+
+       /* Ending address at the end of Flash */
+       writeb(NAND_CMD_UNLOCK2, GPMC_NAND_COMMAND_0);
+       writeb(0xc0, GPMC_NAND_ADDRESS_0);
+       writeb(0xff, GPMC_NAND_ADDRESS_0);
+       writeb(0x03, GPMC_NAND_ADDRESS_0);
+       writeb(-1, GPMC_NAND_DATA_0);
+       writeb(0x79, GPMC_NAND_COMMAND_0);
+       writeb(-1, GPMC_NAND_DATA_0);
+       writeb(-1, GPMC_NAND_DATA_0);
+}
 #endif
 
 #ifdef CONFIG_USB_MUSB_OMAP2PLUS
@@ -207,6 +248,16 @@ int board_init(void)
 }
 
 #ifdef CONFIG_BOARD_LATE_INIT
+
+static void unlock_nand(void)
+{
+       int dev = nand_curr_device;
+       struct mtd_info *mtd;
+
+       mtd = get_nand_dev_by_index(dev);
+       nand_unlock(mtd, 0, mtd->size, 0);
+}
+
 int board_late_init(void)
 {
        struct board_id *board;
@@ -256,6 +307,10 @@ int board_late_init(void)
 
        /* restore hsusb0_data5 pin as hsusb0_data5 */
        MUX_VAL(CP(HSUSB0_DATA5),       (IEN  | PTD | DIS | M0));
+
+#ifdef CONFIG_CMD_NAND_LOCK_UNLOCK
+       unlock_nand();
+#endif
        return 0;
 }
 #endif
diff --git a/board/renesas/draak/Kconfig b/board/renesas/draak/Kconfig
new file mode 100644 (file)
index 0000000..9106387
--- /dev/null
@@ -0,0 +1,15 @@
+if TARGET_DRAAK
+
+config SYS_SOC
+       default "rmobile"
+
+config SYS_BOARD
+       default "draak"
+
+config SYS_VENDOR
+       default "renesas"
+
+config SYS_CONFIG_NAME
+       default "draak"
+
+endif
diff --git a/board/renesas/draak/MAINTAINERS b/board/renesas/draak/MAINTAINERS
new file mode 100644 (file)
index 0000000..1dbcc28
--- /dev/null
@@ -0,0 +1,6 @@
+DRAAK BOARD
+M:     Marek Vasut <marek.vasut+renesas@gmail.com>
+S:     Maintained
+F:     board/renesas/draak/
+F:     include/configs/draak.h
+F:     configs/r8a77995_draak_defconfig
diff --git a/board/renesas/draak/Makefile b/board/renesas/draak/Makefile
new file mode 100644 (file)
index 0000000..604522e
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# board/renesas/draak/Makefile
+#
+# Copyright (C) 2015 Renesas Electronics Corporation
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y  := draak.o
diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c
new file mode 100644 (file)
index 0000000..acdaaff
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * board/renesas/draak/draak.c
+ *     This file is Draak board support.
+ *
+ * Copyright (C) 2017 Marek Vasut <marek.vasut+renesas@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <netdev.h>
+#include <dm.h>
+#include <dm/platform_data/serial_sh.h>
+#include <asm/processor.h>
+#include <asm/mach-types.h>
+#include <asm/io.h>
+#include <linux/errno.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/gpio.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/rmobile.h>
+#include <asm/arch/rcar-mstp.h>
+#include <asm/arch/sh_sdhi.h>
+#include <i2c.h>
+#include <mmc.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define CPGWPCR        0xE6150904
+#define CPGWPR  0xE615090C
+
+#define CLK2MHZ(clk)   (clk / 1000 / 1000)
+void s_init(void)
+{
+       struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE;
+       struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE;
+
+       /* Watchdog init */
+       writel(0xA5A5A500, &rwdt->rwtcsra);
+       writel(0xA5A5A500, &swdt->swtcsra);
+
+       writel(0xA5A50000, CPGWPCR);
+       writel(0xFFFFFFFF, CPGWPR);
+}
+
+#define GSX_MSTP112            BIT(12) /* 3DG */
+#define TMU0_MSTP125           BIT(25) /* secure */
+#define TMU1_MSTP124           BIT(24) /* non-secure */
+#define SCIF2_MSTP310          BIT(10) /* SCIF2 */
+#define DVFS_MSTP926           BIT(26)
+#define HSUSB_MSTP704          BIT(4)  /* HSUSB */
+
+int board_early_init_f(void)
+{
+       /* TMU0,1 */            /* which use ? */
+       mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125 | TMU1_MSTP124);
+
+#if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
+       /* DVFS for reset */
+       mstp_clrbits_le32(MSTPSR9, SMSTPCR9, DVFS_MSTP926);
+#endif
+       return 0;
+}
+
+/* SYSC */
+/* R/- 32 Power status register 2(3DG) */
+#define        SYSC_PWRSR2     0xE6180100
+/* -/W 32 Power resume control register 2 (3DG) */
+#define        SYSC_PWRONCR2   0xE618010C
+
+/* HSUSB block registers */
+#define HSUSB_REG_LPSTS                        0xE6590102
+#define HSUSB_REG_LPSTS_SUSPM_NORMAL   BIT(14)
+#define HSUSB_REG_UGCTRL2              0xE6590184
+#define HSUSB_REG_UGCTRL2_USB0SEL      0x30
+#define HSUSB_REG_UGCTRL2_USB0SEL_EHCI 0x10
+
+int board_init(void)
+{
+       /* adress of boot parameters */
+       gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000;
+
+       /* USB1 pull-up */
+       setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN);
+
+       /* Configure the HSUSB block */
+       mstp_clrbits_le32(MSTPSR7, SMSTPCR7, HSUSB_MSTP704);
+       /* Choice USB0SEL */
+       clrsetbits_le32(HSUSB_REG_UGCTRL2, HSUSB_REG_UGCTRL2_USB0SEL,
+                       HSUSB_REG_UGCTRL2_USB0SEL_EHCI);
+       /* low power status */
+       setbits_le16(HSUSB_REG_LPSTS, HSUSB_REG_LPSTS_SUSPM_NORMAL);
+
+       return 0;
+}
+
+int dram_init(void)
+{
+       if (fdtdec_setup_memory_size() != 0)
+               return -EINVAL;
+
+       return 0;
+}
+
+int dram_init_banksize(void)
+{
+       fdtdec_setup_memory_banksize();
+
+       return 0;
+}
+
+#define RST_BASE       0xE6160000
+#define RST_CA57RESCNT (RST_BASE + 0x40)
+#define RST_CA53RESCNT (RST_BASE + 0x44)
+#define RST_RSTOUTCR   (RST_BASE + 0x58)
+#define RST_CA57_CODE  0xA5A5000F
+#define RST_CA53_CODE  0x5A5A000F
+
+void reset_cpu(ulong addr)
+{
+       unsigned long midr, cputype;
+
+       asm volatile("mrs %0, midr_el1" : "=r" (midr));
+       cputype = (midr >> 4) & 0xfff;
+
+       if (cputype == 0xd03)
+               writel(RST_CA53_CODE, RST_CA53RESCNT);
+       else if (cputype == 0xd07)
+               writel(RST_CA57_CODE, RST_CA57RESCNT);
+       else
+               hang();
+}
diff --git a/board/renesas/eagle/Kconfig b/board/renesas/eagle/Kconfig
new file mode 100644 (file)
index 0000000..1e0710e
--- /dev/null
@@ -0,0 +1,15 @@
+if TARGET_EAGLE
+
+config SYS_SOC
+       default "rmobile"
+
+config SYS_BOARD
+       default "eagle"
+
+config SYS_VENDOR
+       default "renesas"
+
+config SYS_CONFIG_NAME
+       default "eagle"
+
+endif
diff --git a/board/renesas/eagle/MAINTAINERS b/board/renesas/eagle/MAINTAINERS
new file mode 100644 (file)
index 0000000..f387c13
--- /dev/null
@@ -0,0 +1,6 @@
+EAGLE BOARD
+M:     Marek Vasut <marek.vasut+renesas@gmail.com>
+S:     Maintained
+F:     board/renesas/eagle/
+F:     include/configs/eagle.h
+F:     configs/r8a77970_eagle_defconfig
diff --git a/board/renesas/eagle/Makefile b/board/renesas/eagle/Makefile
new file mode 100644 (file)
index 0000000..dffa295
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# board/renesas/eagle/Makefile
+#
+# Copyright (C) 2015 Renesas Electronics Corporation
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y  := eagle.o
diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c
new file mode 100644 (file)
index 0000000..6b918f4
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * board/renesas/eagle/eagle.c
+ *     This file is Eagle board support.
+ *
+ * Copyright (C) 2017 Marek Vasut <marek.vasut+renesas@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <netdev.h>
+#include <dm.h>
+#include <dm/platform_data/serial_sh.h>
+#include <asm/processor.h>
+#include <asm/mach-types.h>
+#include <asm/io.h>
+#include <linux/errno.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/gpio.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/rmobile.h>
+#include <asm/arch/rcar-mstp.h>
+#include <asm/arch/sh_sdhi.h>
+#include <i2c.h>
+#include <mmc.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define CPGWPCR        0xE6150904
+#define CPGWPR  0xE615090C
+
+/* PLL */
+#define PLL0CR         0xE61500D8
+#define PLL0_STC_MASK  0x7F000000
+#define PLL0_STC_OFFSET        24
+
+#define CLK2MHZ(clk)   (clk / 1000 / 1000)
+void s_init(void)
+{
+       struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE;
+       struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE;
+       u32 stc;
+
+       /* Watchdog init */
+       writel(0xA5A5A500, &rwdt->rwtcsra);
+       writel(0xA5A5A500, &swdt->swtcsra);
+
+       /* CPU frequency setting. Set to 0.8GHz */
+       stc = ((800 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_OFFSET;
+       clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc);
+}
+
+#define TMU0_MSTP125           BIT(25) /* secure */
+
+int board_early_init_f(void)
+{
+       writel(0xA5A5FFFF, CPGWPCR);
+       writel(0x5A5A0000, CPGWPR);
+
+       /* TMU0 */
+       mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
+
+       return 0;
+}
+
+int board_init(void)
+{
+       /* adress of boot parameters */
+       gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000;
+
+       return 0;
+}
+
+int dram_init(void)
+{
+       if (fdtdec_setup_memory_size() != 0)
+               return -EINVAL;
+
+       return 0;
+}
+
+int dram_init_banksize(void)
+{
+       fdtdec_setup_memory_banksize();
+
+       return 0;
+}
+
+#define RST_BASE       0xE6160000
+#define RST_CA57RESCNT (RST_BASE + 0x40)
+#define RST_CA53RESCNT (RST_BASE + 0x44)
+#define RST_RSTOUTCR   (RST_BASE + 0x58)
+#define RST_CA57_CODE  0xA5A5000F
+#define RST_CA53_CODE  0x5A5A000F
+
+void reset_cpu(ulong addr)
+{
+       unsigned long midr, cputype;
+
+       asm volatile("mrs %0, midr_el1" : "=r" (midr));
+       cputype = (midr >> 4) & 0xfff;
+
+       if (cputype == 0xd03)
+               writel(RST_CA53_CODE, RST_CA53RESCNT);
+       else if (cputype == 0xd07)
+               writel(RST_CA57_CODE, RST_CA57RESCNT);
+       else
+               hang();
+}
index 48fd1f7d9666160759da9574cc2c69b36975b51b..03d3a3112a15dd537d18aa094c6e376e2d60068e 100644 (file)
@@ -25,17 +25,22 @@ static const struct udevice_id board_ids[] = {
 };
 
 /**
- * Odroix XU3/4 board revisions:
+ * Odroix XU3/XU4/HC1 board revisions (from HC1_MAIN_REV0.1_20170630.pdf):
  * Rev   ADCmax  Board
  * 0.1     0     XU3 0.1
- * 0.2   410     XU3 0.2 | XU3L - no DISPLAYPORT (probe I2C0:0x40 / INA231)
- * 0.3  1408     XU4 0.1
- * Use +10 % for ADC value tolerance.
+ * 0.2   372     XU3 0.2 | XU3L - no DISPLAYPORT (probe I2C0:0x40 / INA231)
+ * 0.3  1280     XU4 0.1
+ * 0.4   739     XU4 0.2
+ * 0.5  1016     XU4+Air0.1 (Passive cooling)
+ * 0.6  1308     XU4S 0.1 (HC1)
+ * Use +1% for ADC value tolerance in the array below, the code loops until
+ * the measured ADC value is lower than then ADCmax from the array.
  */
 struct odroid_rev_info odroid_info[] = {
        { EXYNOS5_BOARD_ODROID_XU3_REV01, 1, 10, "xu3" },
-       { EXYNOS5_BOARD_ODROID_XU3_REV02, 2, 410, "xu3" },
-       { EXYNOS5_BOARD_ODROID_XU4_REV01, 1, 1408, "xu4" },
+       { EXYNOS5_BOARD_ODROID_XU3_REV02, 2, 375, "xu3" },
+       { EXYNOS5_BOARD_ODROID_XU4_REV01, 1, 1293, "xu4" },
+       { EXYNOS5_BOARD_ODROID_HC1_REV01, 1, 1321, "hc1" },
        { EXYNOS5_BOARD_ODROID_UNKNOWN, 0, 4095, "unknown" },
 };
 
@@ -61,7 +66,7 @@ static int odroid_get_board_type(void)
                goto rev_default;
 
        for (i = 0; i < ARRAY_SIZE(odroid_info); i++) {
-               /* ADC tolerance: +20 % */
+               /* ADC tolerance: +1% */
                if (adcval < odroid_info[i].adc_val)
                        return odroid_info[i].board_type;
        }
@@ -132,6 +137,14 @@ bool board_is_odroidxu4(void)
        return false;
 }
 
+bool board_is_odroidhc1(void)
+{
+       if (gd->board_type == EXYNOS5_BOARD_ODROID_HC1_REV01)
+               return true;
+
+       return false;
+}
+
 bool board_is_generic(void)
 {
        if (gd->board_type == EXYNOS5_BOARD_GENERIC)
index 0d17f30712cdf2b3c33903c07f0ee4be52d2ffde..a4eb3514051e9851f3c60cdcc9cc45bcfe7fb2b0 100644 (file)
@@ -176,7 +176,7 @@ char *get_dfu_alt_system(char *interface, char *devstr)
 {
        char *info = "Not supported!";
 
-       if (board_is_odroidxu4())
+       if (board_is_odroidxu4() || board_is_odroidhc1())
                return info;
 
        return env_get("dfu_alt_system");
@@ -189,7 +189,7 @@ char *get_dfu_alt_boot(char *interface, char *devstr)
        char *alt_boot;
        int dev_num;
 
-       if (board_is_odroidxu4())
+       if (board_is_odroidxu4() || board_is_odroidhc1())
                return info;
 
        dev_num = simple_strtoul(devstr, NULL, 10);
index 7b562556e6bcd9469185fbaa5182752f10a36939..7641978a7b13d7b5bd17cccca06b640499c8b49e 100644 (file)
@@ -26,6 +26,10 @@ int board_early_init_f(void)
        return 0;
 }
 
+#define SDIO_BASE              (ARC_PERIPHERAL_BASE + 0xA000)
+#define SDIO_UHS_REG_EXT       (SDIO_BASE + 0x108)
+#define SDIO_UHS_REG_EXT_DIV_2 (2 << 30)
+
 int board_mmc_init(bd_t *bis)
 {
        struct dwmci_host *host = NULL;
@@ -36,12 +40,18 @@ int board_mmc_init(bd_t *bis)
                return 1;
        }
 
+       /*
+        * Switch SDIO external ciu clock divider from default div-by-8 to
+        * minimum possible div-by-2.
+        */
+       writel(SDIO_UHS_REG_EXT_DIV_2, (void __iomem *) SDIO_UHS_REG_EXT);
+
        memset(host, 0, sizeof(struct dwmci_host));
        host->name = "Synopsys Mobile storage";
        host->ioaddr = (void *)ARC_DWMMC_BASE;
        host->buswidth = 4;
        host->dev_index = 0;
-       host->bus_hz = 100000000;
+       host->bus_hz = 50000000;
 
        add_dwmci(host, host->bus_hz / 2, 400000);
 
index 7f17fd1410ed8a3b37e48f33f7ddf14dd4b54f65..b785d8a36e6a0483f1cbdf30f73a3fec82d12b01 100644 (file)
@@ -806,6 +806,31 @@ int fit_image_get_data_offset(const void *fit, int noffset, int *data_offset)
        return 0;
 }
 
+/**
+ * Get 'data-position' property from a given image node.
+ *
+ * @fit: pointer to the FIT image header
+ * @noffset: component image node offset
+ * @data_position: holds the data-position property
+ *
+ * returns:
+ *     0, on success
+ *     -ENOENT if the property could not be found
+ */
+int fit_image_get_data_position(const void *fit, int noffset,
+                               int *data_position)
+{
+       const fdt32_t *val;
+
+       val = fdt_getprop(fit, noffset, FIT_DATA_POSITION_PROP, NULL);
+       if (!val)
+               return -ENOENT;
+
+       *data_position = fdt32_to_cpu(*val);
+
+       return 0;
+}
+
 /**
  * Get 'data-size' property from a given image node.
  *
index 72ae8f4c50310e26eb95b7c14eef62b99a6143ff..cc07fbc8a02adc332fd4a7b45b574aa0f74b17ad 100644 (file)
@@ -173,6 +173,7 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
        int align_len = ARCH_DMA_MINALIGN - 1;
        uint8_t image_comp = -1, type = -1;
        const void *data;
+       bool external_data = false;
 
        if (IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_GZIP)) {
                if (fit_image_get_comp(fit, node, &image_comp))
@@ -189,9 +190,15 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
        if (fit_image_get_load(fit, node, &load_addr))
                load_addr = image_info->load_addr;
 
-       if (!fit_image_get_data_offset(fit, node, &offset)) {
-               /* External data */
+       if (!fit_image_get_data_position(fit, node, &offset)) {
+               external_data = true;
+       } else if (!fit_image_get_data_offset(fit, node, &offset)) {
                offset += base_offset;
+               external_data = true;
+       }
+
+       if (external_data) {
+               /* External data */
                if (fit_image_get_data_size(fit, node, &len))
                        return -ENOENT;
 
index 30e846cf4899520b291811b492c36959fe4cddc6..ff1d35bd77ffbe956477a53eaf8c8ff603a1b0fd 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
index cd1fa64ecb0f7d205d4ab98783f099b31019fbfc..97f2e7d345d4d44c5df6087f6071a13abaa1e606 100644 (file)
@@ -21,6 +21,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_DFU_RAM=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
index 4a90ab695a4d023bad7e4d74d7a107536be9e5d3..2916112f144f5b1ec64253d172cec04474e28003 100644 (file)
@@ -20,6 +20,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_DFU_RAM=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
index 08b301a483b5288cf05ab944df050e1d8662ee2d..4d94548a768ab8649127e576b97fedc495e066f8 100644 (file)
@@ -15,6 +15,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
index 2ff2723065fab5a1ec0104e835b8beac278244d4..586e6abab07ddac2136c37ea66a3037d7a6a721e 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
index 1a0ad5a6d412063f45b171a4633c718f7c451d89..4abac45de504c4d92c875eec2ba2612e390de77c 100644 (file)
@@ -18,6 +18,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
index ee9415517f2a4255dc59ba0f08e1ae2dd7a09c8c..25ddce514b86c3cfe6c0cc8d4a3c5935499e1ed7 100644 (file)
@@ -19,6 +19,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
index 4c2c05c4da06752100dbe56833410090e6a29f0a..808351027411d2831771de99b3be8e26eb2c90f0 100644 (file)
@@ -13,6 +13,7 @@ CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_AXP_DLDO4_VOLT=2500
 CONFIG_AXP_ELDO3_VOLT=1200
 CONFIG_SCSI=y
index a5456127e2bf6dec85fcb1535429c7a32c32954d..52650448091b38398bdc8597d7e21fb3983ef215 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NETCONSOLE=y
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
index 5c8e7594980b45b219b390915f96cf01dad7c3b5..fbf18ae1e10c0bf3f7d06bd3b61a2c2d3d5fae3c 100644 (file)
@@ -18,6 +18,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NETCONSOLE=y
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
index ef95ac6a5effcfed5ba1b868cc669e53d60a87d6..594714ef07269190273abb18800461496b85e514 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_SCSI=y
index c670ab851aece6b03a8b5de076f73d93636bd5aa..8c1c1334e7eb3f24bf6f503d4b1be22c7a18bfdb 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_SCSI=y
 CONFIG_USB_EHCI_HCD=y
index f9f73fdb2393354b96d0d6c4ba868678fd31018d..8da593be6ab33685e7b112d8cb8fb8d1dddef356 100644 (file)
@@ -22,6 +22,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_DFU_RAM=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
index 8f7ee1d55f35ca24c1e0b92426eaf6a8a36b1ea6..cd388a9aee8b1fcb9ce0802871a42901966c51cf 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_SCSI=y
index 84007ad374b8bd0b228d8786f63b84a49fa1d1d9..4cc4dc4b1689598c696f786c03b0cd609930630f 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
index 08749b8f75982899e098f44ea306ee8c9102e2c1..13538fafd11895b1bcd3078d2ca99d48d86b6cc7 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
index a54f9de3a6ee82e75c05a99cc40d0e336be219fd..1392d1f4ac7b00129df8148a446909cf6359149e 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_DM_MMC=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
index fc846b26bddbd28f34d46d4915fef8ff9b70efc3..473b9a6d5a128f30fba9e3b307895af867c05a61 100644 (file)
@@ -19,6 +19,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_MTDIDS_DEFAULT="nand0=e0600000.flash"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=e0600000.flash:512k(uboot),128k(env),6m@1m(kernel),-(fs)"
+CONFIG_FSL_SATA=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
index 0893c4ac026077a3b09adb9e174612e3b40096bf..c95cec698af9d94286f304c9da5a0d27c1f8a3ab 100644 (file)
@@ -23,6 +23,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_SATA_SIL3114=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
index 8a8f05544f2fdd395d51cd842f1e898b70b680d6..4403bc0d62ccdcd8a6427d1a466931ee5769d375 100644 (file)
@@ -23,6 +23,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_SATA_SIL3114=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
index 14b7a5a8bae3fa3386e67e71e4989053d23f07d9..bc54b3ac52a105b8f34451c8f834fa714ce55dd6 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_FSL_SATA=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
 CONFIG_SYS_NS16550=y
index 6e30ac45f0ff5c57c5d7921250ede119ddc7f7b0..4f9219b7ea77872b834ac16313b5ef2c53419f32 100644 (file)
@@ -18,6 +18,7 @@ CONFIG_CMD_PING=y
 # CONFIG_CMD_HASH is not set
 CONFIG_CMD_EXT2=y
 CONFIG_ENV_IS_IN_FLASH=y
+CONFIG_SCSI_AHCI=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
index bce08d139e77bc8909151e74906fa211c96b3335..14e2933f5b910539589146058483e8d17d779238 100644 (file)
@@ -18,6 +18,7 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 # CONFIG_CMD_HASH is not set
 CONFIG_CMD_EXT2=y
+CONFIG_SCSI_AHCI=y
 CONFIG_SYS_FSL_DDR2=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
index 9dd7c735d11982068bbba92160f24872125166ae..86546f068e2f3b061a4dd5cb7ab1491aa29396f0 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 # CONFIG_CMD_HASH is not set
 CONFIG_CMD_EXT2=y
+CONFIG_SCSI_AHCI=y
 CONFIG_SYS_FSL_DDR2=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
index 40256c8708f6715374938be304d8a07f75c9d3fb..cb2e06377d9735021660a49195d25c309aac2f05 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_EXT2=y
 CONFIG_DOS_PARTITION=y
+CONFIG_SCSI_AHCI=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SCSI=y
index d51bdf3b9e5cee22934e4d5bd0f24d742d16cfbd..a85ecfb976c005eed227ba808f15b3a812ad0282 100644 (file)
@@ -15,6 +15,7 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_EXT2=y
 CONFIG_DOS_PARTITION=y
+CONFIG_SCSI_AHCI=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
index dd2a92b69143f63f297d364cb66646d12e75d77d..72ff192a52eeca8ebf0ba9700445dad9b46febee 100644 (file)
@@ -15,6 +15,7 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_EXT2=y
 CONFIG_DOS_PARTITION=y
+CONFIG_SCSI_AHCI=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
index 8bce411663b9324b05ea47e237f6dab70db5dd51..e79c3a2245d8cb9a7b30c34e9c6114506983b828 100644 (file)
@@ -10,6 +10,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_SUNXI_NO_PMIC=y
 CONFIG_SCSI=y
index 24a4aff478262ba27dc6418f94d95827df7ec024..d51ee9d91f409af5ad13098d5d338950c2dad503 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_SCSI=y
 CONFIG_USB_EHCI_HCD=y
index 84c83dab2ee0210e17274b7bff57db4a5fcfaa2f..b4a1964629eb54a63119604dba8c67632d653f64 100644 (file)
@@ -15,6 +15,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_SCSI=y
index d39cc66d8558714e5551719ae78ed73af46beba2..50dd0fc32c626d57ff441fcfe3d48ca8d6b2646d 100644 (file)
@@ -18,6 +18,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
index 17f825f241b55114b6b5de8ad4e43860ea8462c4..6f3782c1059cf344de008179fe63945bec5b81e1 100644 (file)
@@ -20,6 +20,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
index 5dda2bbdb5282f0c59994e866569d087c21d65b2..1eedd3c21fd4db1d7b3e2eedf7ecab5f0a9c6827 100644 (file)
@@ -25,6 +25,7 @@ CONFIG_CMD_MTDPARTS=y
 CONFIG_MTDIDS_DEFAULT="nor0=ec000000.nor"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=ec000000.nor:256k(vsc7385-firmware),256k(dtb),5632k(kernel),57856k(fs),256k(qe-ucode-firmware),1280k(u-boot)"
 CONFIG_ENV_IS_IN_FLASH=y
+CONFIG_SATA_SIL3114=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
 CONFIG_NETDEVICES=y
index 2e96ba2a526437dc8a8c071bc27982ee9ba5e09c..a16e3630009e071064be940deef2d088298c3936 100644 (file)
@@ -18,6 +18,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
index 6e4d04c13b66c270d0ac45f69a1c20a4b3025498..fc96401d3e55c391e1ea84370ddafda3c2c2a9ea 100644 (file)
@@ -39,6 +39,7 @@ CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
+CONFIG_SCSI_AHCI=y
 # CONFIG_BLK is not set
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
index e36491086f0bb6d9084ba7c2a9988244b3a11dbd..681e2a54c8ffa2bccb9c50eaac558fc9154c45e1 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
+CONFIG_SCSI_AHCI=y
 # CONFIG_BLK is not set
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
index 2b1b34d80a2927778d8928e64ecbf9ffcef2f27a..18107e88ff7c256d98b3ec9a427ae41ba530dd2f 100644 (file)
@@ -45,6 +45,7 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
index ddf8c8d1e357db63dbef33b7667d3743267279eb..c40e14fdf28de05fdb283b749c8578ed63855c02 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
index 6eba47b8ce0d47073fc866d455c34377bf2c8eb8..5d1243ad92767ea99a7ae58a418718caa894b07a 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
index 79ff0aaed282adfc5350d898f2a4fe290bf4432c..efe15459bcfdb7ab1be0d052ca5892109a07fefd 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NETCONSOLE=y
+CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
index 47c0b4c6221a6083bd9378d38fb8b5d5fbe08de0..418e4e2d8cbebd51f20c79604a92a60fed327afe 100644 (file)
@@ -45,6 +45,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_DWC_AHSATA=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_SF=y
 CONFIG_PHYLIB=y
index 8f0a7f68ce6fb4f0b9a33818b07848458f989907..9c3031bac862867875a028a02672db659e3f22a0 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SCSI_AHCI=y
 CONFIG_CMD_PCA953X=y
 CONFIG_LED_STATUS=y
 CONFIG_LED_STATUS_GPIO=y
index 0773aca0d4998c14438c1473e5c12785baaf58eb..8e0746bcf83540d2b6375a7ba690f8cd95e59444 100644 (file)
@@ -52,6 +52,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=spi0.0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=spi0.0:768k(uboot),256k(uboot-environment),-(reserved)"
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_DWC_AHSATA=y
 CONFIG_DM_MMC=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
index 69b1cbfdfe8bc843f9f8edff0f54fefea4648e74..ca80f18e77387e13b43383a3bab80e82e880ad53 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SCSI_AHCI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SCSI=y
 CONFIG_SYS_NS16550=y
index 48e9f6e920d021957b95d9b3889b6954d02d1bcf..67fa8e4e87c20ec7e985c93bef0d01060ebc6d73 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_FSL_SATA=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
index 58729b62ada7d05095e82925f7c3181d9dc5f788..19a4daa2c26b9230c372f739300d88dd7284d204 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_FSL_SATA=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
index f65e5259342551d9d61ff959c598897589848bdf..856591e2c88251e663da6f6cbe85a552d9ae7547 100644 (file)
@@ -35,6 +35,7 @@ CONFIG_EFI_PARTITION=y
 CONFIG_OF_BOARD_FIXUP=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_SCSI_AHCI=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
index 496c5c02d49400c893b7de62ed046705aef9228d..61fd89200587d363b6bfe5f9c1995fd8ed51a149 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index beac2661892951ef7486972c0da8db4d1fb50164..5cc27813b052f3a3a4c0fd15104e49e7498b4c31 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_SCSI_AHCI=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_MV=y
index 23eaa123a2fdf2201440cfa7153145e99deb3ed3..6724af04bc2616370f8b153253a6f5a2271a25b0 100644 (file)
@@ -37,6 +37,7 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_SATA_MV=y
 # CONFIG_MMC is not set
 CONFIG_NAND=y
 CONFIG_NAND_PXA3XX=y
index 814df1cd275c5b6548fc842b63b61183740f4a0d..1fd7c50e316c3189ac9b249c5c049d922478e671 100644 (file)
@@ -40,6 +40,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_DWC_AHSATA=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_PHYLIB=y
index cbc9e82eedbe21dcf3b81d2515ad5d8379c1e3b9..144a86bcbfce63f0b053eab3d50c121accfc8381 100644 (file)
@@ -28,6 +28,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_DWC_AHSATA=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
index 9be2d6cc529f683d7559ccf4b3ab13b33ce29cb4..075e5070f0440cca19cbdb80b161b780963d8e0f 100644 (file)
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_DWC_AHSATA=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
index 62ad86ced4b9d555017963ea7ec2a3178633ff5a..f5556e30aab852b9983088258d792298dc711d8d 100644 (file)
@@ -23,6 +23,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:896k(u-boot),128k(u-boot-env),5m(ke
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
index 1130faa3923aad9cab31d83d646a341e881a86d8..9d24f9c16bb59fb462f1d4b1e0d101042f166552 100644 (file)
@@ -19,6 +19,7 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index 987a924b7e9ff6703c423cb7ebeb9a05b4f1ce88..6d513cf584ad282926bd8706a6d7a434dc8cbd46 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_CMD_DATE=y
 CONFIG_CMD_FAT=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
index 14540ca3718a7973df798192c0dda1457dc66dd2..4eafb6d5faf750b106756ad1a9639b86f329fb06 100644 (file)
@@ -21,6 +21,7 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_EXT2=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_NS16550=y
index 80652fec7966d9ba728f331cfa83a986680ab39c..bdfd62a5765eaf871281819b577a8ee17965e41a 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)"
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
index d219fee508f4941ba4054e7d366b319d6067cf9a..66a668a7bb56f42bb6fafb69f3f68af33025cb2c 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:896K(uboot),128K(uboot_env),-@1M(ro
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
index 5379cf3b3b321890ecad44187ad987f3cbe6898a..b35d0914e33a4e910a204d466be7323e0431be48 100644 (file)
@@ -53,6 +53,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=nand:16m(uboot),1m(env),-(rootfs)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
index fe364d07ce46a89d34c74d643d4c844bc8af9aaa..6a2c196c9bb4bb131b8ff8a6b4dde44012997a1b 100644 (file)
@@ -53,6 +53,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=nand:16m(uboot),1m(env),-(rootfs)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_MV88E61XX_SWITCH=y
 CONFIG_MV88E61XX_CPU_PORT=5
index dd4d73ce9e862d511ed36ffcbdefc12773a4546a..be6cf0cbdece48c42e9e76d2cceb6674a4f05455 100644 (file)
@@ -56,6 +56,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=nand:16m(uboot),1m(env),-(rootfs)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
index 20a7b71737175d23afb032ac21fc5eb41a850112..f55b5dcebd98f7aef0f9e77960176ced8d4a3ea6 100644 (file)
@@ -23,6 +23,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_NVRAM=y
+CONFIG_SCSI_AHCI=y
 # CONFIG_MMC is not set
 CONFIG_SCSI=y
 CONFIG_OF_LIBFDT=y
index fd7c14886070e2b0fe3e6662bdee1570977e7c24..f6bfa06dcb80a5b60bbd1faca8f7c8e637de547e 100644 (file)
@@ -22,6 +22,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
index bac0d95b76bea022890209e85ce548b17e2e7cf2..d222c335fea6ac9b2b1b96605cb265d2fe4088ab 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index 4073db6583e7bd3f31fd239fdbae02f54d3222d0..0435d51dc41ad5ee680383eb195857ee6196778a 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SCSI_AHCI=y
 # CONFIG_BLK is not set
 CONFIG_DM_MMC=y
 CONFIG_DM_SPI_FLASH=y
index 529651be75a55b93dffb4a80847adfb41fed3e30..7d0e985ebc918f338a7d4c60ec4e64bf35ecfffe 100644 (file)
@@ -9,6 +9,7 @@ CONFIG_CMD_USB=y
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
 CONFIG_DM=y
+CONFIG_SCSI_AHCI=y
 CONFIG_DM_PCI=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_DM_SPI=y
index 58276f7f3c1aee03a379907a89b91f38afa61781..df5bdaf41d2006fc8c82ef51d8a6c52ff195c4b7 100644 (file)
@@ -21,6 +21,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SCSI_AHCI=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
index 8629800a2ba947a5d45cc1a7d59bc32b869d0d2a..805364e8c78fe99a45bfa7664d003ae5ecc886e0 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SCSI_AHCI=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_NETDEVICES=y
index e800966e7e89d51549d03cfd0b67da22d3b77336..d020f7e6020364122dbf8062ae89ec87eda98716 100644 (file)
@@ -10,6 +10,7 @@ CONFIG_CMD_USB=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_DM=y
+CONFIG_SCSI_AHCI=y
 CONFIG_DM_PCI=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_DM_SPI=y
index bb5e72cbcd7b6e9dae9ff2d36506a7e8738aacd4..93f7a153039f6b524c1c02f4ff6b35b70421e0d0 100644 (file)
@@ -22,6 +22,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SCSI_AHCI=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
index 7c143e9f917fd69feaef478279b0ce26e22aa2af..539326c9a387af71c284a994b508a5193c659418 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SCSI_AHCI=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_NETDEVICES=y
index 1ab8f18cd34ed6ce19f2eaac0c5ab305d0cbf3c4..e53203284074be695028f5ec7cb1eeb1b7c6c45f 100644 (file)
@@ -25,6 +25,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
+CONFIG_SCSI_AHCI=y
 CONFIG_FSL_CAAM=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_PHYLIB=y
index 4df0a21298830d7d5fcedbad20fb68025f0c7928..077df1a5bfaee344022a0856acde606874dd3bf6 100644 (file)
@@ -28,6 +28,7 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
index d6ba4be28653e4a612d4851239743ede4a05c3a0..3627eb998beeb33764172a9d5ae68d520e9a356b 100644 (file)
@@ -20,6 +20,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
index 291144d421cbe976a0d83d349b17085b89e13fd2..845aee4730615e35196c4976c21e51efbf259e08 100644 (file)
@@ -39,6 +39,7 @@ CONFIG_MTDIDS_DEFAULT="nand0=mxc_nand"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=mxc_nand:1024k(u-boot),512k(env1),512k(env2),14m(boot),240m(data),-@2048k(UBI)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_DWC_AHSATA=y
 CONFIG_NAND=y
 CONFIG_NAND_MXC=y
 CONFIG_PHYLIB=y
index 0fd4514c3748c0ebc8193130779de57705d264d9..283a964f24b437133c5964050fda75f9b458eece 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_MAC_PARTITION=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SCSI_AHCI=y
 CONFIG_BLOCK_CACHE=y
 CONFIG_DM_GPIO=y
 # CONFIG_MVEBU_GPIO is not set
index cffb3d06e6580a470bc930e945030bca0c52d337..48742d612a7bd90fe2e1c0184d5b774db5c71dcc 100644 (file)
@@ -39,6 +39,7 @@ CONFIG_MAC_PARTITION=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SCSI_AHCI=y
 CONFIG_BLOCK_CACHE=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
index 95db6c610e3b2268361ccaf63637ed22cef4e8e7..d99c4f52d97f079ef0f4238a75791ae48f962185 100644 (file)
@@ -35,6 +35,7 @@ CONFIG_MAC_PARTITION=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SCSI_AHCI=y
 CONFIG_BLOCK_CACHE=y
 CONFIG_DM_I2C=y
 CONFIG_MISC=y
index f77979308257bed44766bc605a4efaa3a3cfe94e..366e4378df76576c3f068dd4535402830670bb5d 100644 (file)
@@ -41,6 +41,7 @@ CONFIG_MAC_PARTITION=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SCSI_AHCI=y
 CONFIG_BLOCK_CACHE=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
index 3fba84c04756083e646eb456b070c39b99814452..7471b10aa02d6b1a43295cb10b870858e624a9ca 100644 (file)
@@ -20,6 +20,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_DWC_AHSATA=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
index 37a2f2abd3a1fdc87f5d5b7b11469915534fd55a..05eaf1270dd5c988c8b74ab068990b21c9db1cff 100644 (file)
@@ -28,6 +28,7 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_DM_THERMAL=y
 CONFIG_USB=y
index 6beb52893c24b0b7f0ece0a6847b910a7bb68d76..c52c3923b4b05dfeeece842a4987dda61c351454 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_PHYLIB=y
index 09bb8f1e932a331e7f21f0107c4f7b9df576d1de..8a71ed894e37744b9a05896f8e967aad8f46894b 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
index 3e3150042d5e127158ede85156caa624c553569c..76b1f90354b6d4c63b64c863259116d6824cc646 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index edd279ad6fe47a1bd9b05b55f8af329f089b6abd..67cb4dd2e9f9079355dc5eb9573d8e234123d4fb 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index 2454c4f380ed0215310eef96c8e6c35e102a0e7c..dc721282755250344a90bb91f0942ddfb6933ab8 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index 6f67c5db6369c59709f6ae32230cc52409d4ca6b..f2dec062e754ab1ef7d51e0501d6e41c61a1cc8f 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_CMD_FAT=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index cdcc09641e92a30fc05d85cc39946b4fafd9ed3f..c898150d9e60e20f764aa25b8bdb4a288fb974ff 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index c25d2bf67b6d9f81c7fbdbe66d1107192ba8bc9b..d0153d4df6784350258db54ccfb3020a7b968a88 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_DWC_AHSATA=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_PHYLIB=y
index 65d75910b6f4936ccd2f03371b67854c5155dfcb..bf12cbde80af87c915b6031ea670c87c473d6b8e 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_DWC_AHSATA=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_PHYLIB=y
index 3084fef89c381d82bfc7edc661e31a7cde508cd7..1a69e496c8895a1f8744ed383ce70f04c6ecc084 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
index 425b53a0add19bc78897be7ce634fc1ca2c5cdb2..5e111cb3399f6f712049cc95bd13e2c531507040 100644 (file)
@@ -21,6 +21,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
index 76b1d35b2aafad12ba23f6b8b7e47ab3c4080177..976c06a29d3854708bf9393857f322f1df15f2f9 100644 (file)
@@ -1,7 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
 CONFIG_ARCH_EXYNOS5=y
-CONFIG_IDENT_STRING=" for ODROID-XU3"
+CONFIG_IDENT_STRING=" for ODROID-XU3/XU4/HC1"
 CONFIG_DEFAULT_DEVICE_TREE="exynos5422-odroidxu3"
 CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
index 8801268212957c8854b51c5f650f5a51b9009389..db72e6f6a86eaaf202d0728c888f8ac6febadbc8 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_FASTBOOT_BUF_ADDR=0x82000000
 # CONFIG_CMD_IMI is not set
 CONFIG_CMD_SPL=y
 CONFIG_CMD_SPL_NAND_OFS=0x240000
+CONFIG_CMD_SPL_WRITE_SIZE=0x20000
 # CONFIG_CMD_EEPROM is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
index acf8962201f39eb9f9981a6670136294d758aa81..b3c6fa9cf11bc8805e05c65f0160b0315f42fe65 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SCSI_AHCI=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
 CONFIG_CMD_TCA642X=y
index 9bc628f168ebe151555130a16f79f1a656e394bc..1a829b763f3af17f3c97389ba8cd6cd240747d0a 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=nand_mtd:0x100000@0x000000(uboot),0x400000@0x1
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
index c74f0cf56f435f59613e7e4bc6dda5a894780e52..7a95b5b54fcd7f5f799673ad848044d1a7d6b940 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=nand_mtd:0x100000@0x000000(uboot),0x400000@0x1
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
index 6792af84efb1b62c84e80061755cbc51c0d63ee9..757be16f5337aa26d933bebd57ccd7863e0cc3b3 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=nand_mtd:0x100000@0x000000(uboot),0x400000@0x1
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
index bc37f89f4898853dd9128c62df7cbed288a8c1c4..0c3258ff1bd4f4d723850ccb6e75a3d01e116f8c 100644 (file)
@@ -24,6 +24,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_CMD_PCA953X=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index 518483c5d9855284a6fd81dc7d77287770c95df6..ac96221ebf04bcf1f3a236ede860cd50e347c504 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_CMD_PCA953X=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
index f353eea691a03f0ba3eed9323d8e00186e6c74dd..3cd4d4543328c076c101e72cd97849ff919cbb13 100644 (file)
@@ -8,6 +8,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_USB=y
 CONFIG_OF_BOARD=y
+CONFIG_SCSI_AHCI=y
 CONFIG_AHCI_PCI=y
 CONFIG_BLK=y
 # CONFIG_MMC is not set
diff --git a/configs/r8a77970_eagle_defconfig b/configs/r8a77970_eagle_defconfig
new file mode 100644 (file)
index 0000000..621ac1f
--- /dev/null
@@ -0,0 +1,56 @@
+CONFIG_ARM=y
+CONFIG_ARCH_RMOBILE=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_RCAR_GEN3=y
+CONFIG_R8A77970=y
+CONFIG_TARGET_EAGLE=y
+CONFIG_DEFAULT_DEVICE_TREE="r8a77970-eagle"
+CONFIG_SMBIOS_PRODUCT_NAME=""
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="console=ttySC0,115200 rw root=/dev/nfs nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
+CONFIG_DEFAULT_FDT_FILE="r8a77970-eagle.dtb"
+CONFIG_VERSION_VARIABLE=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_BOOTZ=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_OF_CONTROL=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_CLK=y
+CONFIG_CLK_RENESAS=y
+CONFIG_DM_GPIO=y
+CONFIG_RCAR_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_IIC=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_UNIPHIER=y
+CONFIG_PHY_MICREL=y
+CONFIG_PHY_MICREL_KSZ90X1=y
+CONFIG_DM_ETH=y
+CONFIG_RENESAS_RAVB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_PFC=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SCIF_CONSOLE=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_STORAGE=y
+CONFIG_SMBIOS_MANUFACTURER=""
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
new file mode 100644 (file)
index 0000000..6998ce5
--- /dev/null
@@ -0,0 +1,61 @@
+CONFIG_ARM=y
+CONFIG_ARCH_RMOBILE=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_RCAR_GEN3=y
+CONFIG_R8A77995=y
+CONFIG_TARGET_DRAAK=y
+CONFIG_DEFAULT_DEVICE_TREE="r8a77995-draak"
+CONFIG_SMBIOS_PRODUCT_NAME=""
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="console=ttySC0,115200 rw root=/dev/nfs nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
+CONFIG_DEFAULT_FDT_FILE="r8a77995-draak.dtb"
+CONFIG_VERSION_VARIABLE=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_BOOTZ=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_OF_CONTROL=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_CLK=y
+CONFIG_CLK_RENESAS=y
+CONFIG_DM_GPIO=y
+CONFIG_RCAR_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_IIC=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_UNIPHIER=y
+CONFIG_MTD=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_CFI_FLASH=y
+CONFIG_RENESAS_RPC_HF=y
+CONFIG_PHY_MICREL=y
+CONFIG_PHY_MICREL_KSZ90X1=y
+CONFIG_DM_ETH=y
+CONFIG_RENESAS_RAVB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_PFC=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SCIF_CONSOLE=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_STORAGE=y
+CONFIG_SMBIOS_MANUFACTURER=""
index 6145077ebf311312a9347f9e4c0eaaedc4f5d3ef..21704ec1ff7d89c433f72c7b20a9c7c40d3d3fa2 100644 (file)
@@ -25,6 +25,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:512K(uboot),512K(env),4M(kernel),-(
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_MVSATA_IDE=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
index 1152b69c72ea6b97179b229a60d0f3f9b6a5f419..5adcd9d98692a9b3cebbd07a8460a3a390be7c73 100644 (file)
@@ -35,6 +35,7 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_EFI_PARTITION=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_PCI=y
 CONFIG_DM_THERMAL=y
index 863d6ce3d0bcc091cf540bb21e4402403d9a5de0..f602c839c314625f8329131fd0312d7a693d7b2e 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_SATA_MV=y
 CONFIG_FPGA_ALTERA=y
 CONFIG_DM_GPIO=y
 # CONFIG_MMC is not set
index b9b5cbc2c5c7c5236ce021b2d10b1e9067d15660..ffb26cdac3398b52db549b7c51f5a2c4779e95fc 100644 (file)
@@ -29,6 +29,7 @@ CONFIG_CMD_BTRFS=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_SCSI_AHCI=y
 CONFIG_MISC=y
 CONFIG_ATSHA204A=y
 CONFIG_MMC_SDHCI=y
index b92b181d4fb952e620c4a93235f8cc82d8f26412..52cfdb009c4afefca36bc3c6faf28dad68fac8f8 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
index 4b6b9d9aaee7a5dc11144787bec158f28f9ebb12..3c277772c0836ff7264154b2826477533b9466be 100644 (file)
@@ -29,6 +29,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_DWC_AHSATA=y
 CONFIG_PHYLIB=y
 CONFIG_DM_THERMAL=y
 CONFIG_USB=y
index ff865f1bdcd04ca7a42da5c016138f28ea1ac057..ee9528caec7151b30ae24343de6e09a42b02841d 100644 (file)
@@ -49,6 +49,7 @@ CONFIG_ENV_IS_IN_FAT=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
index bf27ca48db93db884f3f73de0d4884a991eec9eb..158dc7ed8c6724cb920cd71dab1f27209dfe6184 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_ENV_IS_IN_FAT=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
index 80c5e4934844ea30612673dbbe5121b748cab1f3..01e956cbc9358bb6b28f11b2093b9dc2b8947e98 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_ENV_IS_IN_FAT=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
index 232532c995970c4e5a7a482677c07e1a0875ea4b..ab2f0a830a0cd4bb95e5d94ec823e399bf3bca60 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_ENV_IS_IN_FAT=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
diff --git a/doc/device-tree-bindings/clock/snps,hsdk-cgu.txt b/doc/device-tree-bindings/clock/snps,hsdk-cgu.txt
new file mode 100644 (file)
index 0000000..82fe1dd
--- /dev/null
@@ -0,0 +1,35 @@
+* Synopsys HSDK clock generation unit
+
+The Synopsys HSDK clock controller generates and supplies clock to various
+controllers and peripherals within the SoC.
+
+Required Properties:
+
+- compatible: should be "snps,hsdk-cgu-clock"
+- reg: the pair of physical base address and length of clock generation unit
+  memory mapped region and creg arc core divider memory mapped region.
+- #clock-cells: should be 1.
+
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume. All available clocks are defined as
+preprocessor macros in the dt-bindings/clock/snps,hsdk-cgu.h headers and can be
+used in device tree sources.
+
+Example: Clock controller node:
+
+       cgu_clk: cgu-clk@f0000000 {
+               compatible = "snps,hsdk-cgu-clock";
+               reg = <0xf0000000 0x1000>, <0xf00014B8 0x4>;
+               #clock-cells = <1>;
+       };
+
+Example: UART controller node that consumes the clock generated by the clock
+controller:
+
+       uart0: serial0@f0005000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0xf0005000 0x1000>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               clocks = <&cgu_clk CLK_SYS_UART_REF>;
+       };
index 6f727a1e8a2fe7d91f4af7d7ed4a9170a9369e01..88663a161d34e9c1824144c6aa0fdce51f07307b 100644 (file)
@@ -288,7 +288,8 @@ In this case the 'data' property is omitted. Instead you can use:
 
 The 'data-offset' property can be substituted with 'data-position', which
 defines an absolute position or address as the offset. This is helpful when
-booting U-Boot proper before performing relocation.
+booting U-Boot proper before performing relocation. Pass '-p [offset]' to
+mkimage to enable 'data-position'.
 
 Normal kernel FIT image has data embedded within FIT structure. U-Boot image
 for SPL boot has external data. Existence of 'data-offset' can be used to
index 803064aaf110a11c8da5e529084839e4f9b7b05b..990de72309a222b032798a641042651db467f5e8 100644 (file)
@@ -20,6 +20,17 @@ config SATA
 
          See also CMD_SATA which provides command-line support.
 
+config LIBATA
+       bool
+       help
+         Select this to build and link the libata helper functions.
+
+config SCSI_AHCI
+       bool "Enable SCSI interface to SATA devices"
+       select LIBATA
+       help
+         Enable this to allow interfacing SATA devices via the SCSI layer.
+
 menu "SATA/SCSI device support"
 
 config AHCI_PCI
@@ -47,4 +58,44 @@ config DWC_AHCI
          Enable this driver to support Sata devices through
          Synopsys DWC AHCI module.
 
+config DWC_AHSATA
+       bool "Enable DWC AHSATA driver support"
+       select LIBATA
+       help
+         Enable this driver to support the DWC AHSATA SATA controller found
+         in i.MX5 and i.MX6 SoCs.
+
+config FSL_SATA
+       bool "Enable Freescale SATA controller driver support"
+       select LIBATA
+       help
+         Enable this driver to support the SATA controller found in
+         some Freescale PowerPC SoCs.
+
+config MVSATA_IDE
+       bool "Enable Marvell SATA controller driver support via IDE interface"
+       help
+         Enable this driver to support the SATA controller found in
+         some Marvell SoCs, running in IDE compatibility mode using PIO.
+
+config SATA_MV
+       bool "Enable Marvell SATA controller driver support"
+       select LIBATA
+       help
+         Enable this driver to support the SATA controller found in
+         some Marvell SoCs.
+
+config SATA_SIL
+       bool "Enable Silicon Image SIL3131 / SIL3132 / SIL3124 SATA driver support"
+       select LIBATA
+       help
+         Enable this driver to support the SIL3131, SIL3132 and SIL3124
+         SATA controllers.
+
+config SATA_SIL3114
+       bool "Enable Silicon Image SIL3114 SATA driver support"
+       select LIBATA
+       help
+         Enable this driver to support the SIL3114 SATA controllers.
+
 endmenu
index 4e2de930256293237eb6634f0caa0e5b17910378..a94c804e7a403351b46cb422878c7268a838f6a6 100644 (file)
@@ -13,10 +13,8 @@ obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
 obj-$(CONFIG_FSL_SATA) += fsl_sata.o
 obj-$(CONFIG_LIBATA) += libata.o
 obj-$(CONFIG_MVSATA_IDE) += mvsata_ide.o
-obj-$(CONFIG_MX51_PATA) += mxc_ata.o
 obj-$(CONFIG_SATA) += sata.o
 obj-$(CONFIG_SATA_CEVA) += sata_ceva.o
-obj-$(CONFIG_SATA_DWC) += sata_dwc.o
 obj-$(CONFIG_SATA_MV) += sata_mv.o
 obj-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
 obj-$(CONFIG_SATA_SIL) += sata_sil.o
diff --git a/drivers/ata/mxc_ata.c b/drivers/ata/mxc_ata.c
deleted file mode 100644 (file)
index 44bb406..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Freescale iMX51 ATA driver
- *
- * Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
- *
- * Based on code by:
- *     Mahesh Mahadevan <mahesh.mahadevan@freescale.com>
- *
- * Based on code from original FSL ATA driver, which is
- * part of eCos, the Embedded Configurable Operating System.
- * Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <command.h>
-#include <config.h>
-#include <asm/byteorder.h>
-#include <asm/io.h>
-#include <ide.h>
-
-#include <asm/arch/imx-regs.h>
-#include <asm/arch/clock.h>
-
-/* MXC ATA register offsets */
-struct mxc_ata_config_regs {
-       u8      time_off;       /* 0x00 */
-       u8      time_on;
-       u8      time_1;
-       u8      time_2w;
-       u8      time_2r;
-       u8      time_ax;
-       u8      time_pio_rdx;
-       u8      time_4;
-       u8      time_9;
-       u8      time_m;
-       u8      time_jn;
-       u8      time_d;
-       u8      time_k;
-       u8      time_ack;
-       u8      time_env;
-       u8      time_udma_rdx;
-       u8      time_zah;       /* 0x10 */
-       u8      time_mlix;
-       u8      time_dvh;
-       u8      time_dzfs;
-       u8      time_dvs;
-       u8      time_cvh;
-       u8      time_ss;
-       u8      time_cyc;
-       u32     fifo_data_32;   /* 0x18 */
-       u32     fifo_data_16;
-       u32     fifo_fill;
-       u32     ata_control;
-       u32     interrupt_pending;
-       u32     interrupt_enable;
-       u32     interrupt_clear;
-       u32     fifo_alarm;
-};
-
-struct mxc_data_hdd_regs {
-       u32     drive_data;     /* 0xa0 */
-       u32     drive_features;
-       u32     drive_sector_count;
-       u32     drive_sector_num;
-       u32     drive_cyl_low;
-       u32     drive_cyl_high;
-       u32     drive_dev_head;
-       u32     command;
-       u32     status;
-       u32     alt_status;
-};
-
-/* PIO timing table */
-#define        NR_PIO_SPECS    5
-static uint16_t pio_t1[NR_PIO_SPECS]   = { 70,  50,  30,  30,  25 };
-static uint16_t pio_t2_8[NR_PIO_SPECS] = { 290, 290, 290, 80,  70 };
-static uint16_t pio_t4[NR_PIO_SPECS]   = { 30,  20,  15,  10,  10 };
-static uint16_t pio_t9[NR_PIO_SPECS]   = { 20,  15,  10,  10,  10 };
-static uint16_t pio_tA[NR_PIO_SPECS]   = { 50,  50,  50,  50,  50 };
-
-#define        REG2OFF(reg)    ((((uint32_t)reg) & 0x3) * 8)
-static void set_ata_bus_timing(unsigned char mode)
-{
-       uint32_t T = 1000000000 / mxc_get_clock(MXC_IPG_CLK);
-
-       struct mxc_ata_config_regs *ata_regs;
-       ata_regs = (struct mxc_ata_config_regs *)CONFIG_SYS_ATA_BASE_ADDR;
-
-       if (mode >= NR_PIO_SPECS)
-               return;
-
-       /* Write TIME_OFF/ON/1/2W */
-       writeb(3, &ata_regs->time_off);
-       writeb(3, &ata_regs->time_on);
-       writeb((pio_t1[mode] + T) / T, &ata_regs->time_1);
-       writeb((pio_t2_8[mode] + T) / T, &ata_regs->time_2w);
-
-       /* Write TIME_2R/AX/RDX/4 */
-       writeb((pio_t2_8[mode] + T) / T, &ata_regs->time_2r);
-       writeb((pio_tA[mode] + T) / T + 2, &ata_regs->time_ax);
-       writeb(1, &ata_regs->time_pio_rdx);
-       writeb((pio_t4[mode] + T) / T, &ata_regs->time_4);
-
-       /* Write TIME_9 ; the rest of timing registers is irrelevant for PIO */
-       writeb((pio_t9[mode] + T) / T, &ata_regs->time_9);
-}
-
-int ide_preinit(void)
-{
-       struct mxc_ata_config_regs *ata_regs;
-       ata_regs = (struct mxc_ata_config_regs *)CONFIG_SYS_ATA_BASE_ADDR;
-
-       /* 46.3.3.4 @ FSL iMX51 manual */
-       /* FIFO normal op., drive reset */
-       writel(0x80, &ata_regs->ata_control);
-       /* FIFO normal op., drive not reset */
-       writel(0xc0, &ata_regs->ata_control);
-
-       /* Configure the PIO timing */
-       set_ata_bus_timing(CONFIG_MXC_ATA_PIO_MODE);
-
-       /* 46.3.3.4 @ FSL iMX51 manual */
-       /* Drive not reset, IORDY handshake */
-       writel(0x41, &ata_regs->ata_control);
-
-       return 0;
-}
diff --git a/drivers/ata/sata_dwc.c b/drivers/ata/sata_dwc.c
deleted file mode 100644 (file)
index 2f3b2dd..0000000
+++ /dev/null
@@ -1,2077 +0,0 @@
-/*
- * sata_dwc.c
- *
- * Synopsys DesignWare Cores (DWC) SATA host driver
- *
- * Author: Mark Miesfeld <mmiesfeld@amcc.com>
- *
- * Ported from 2.6.19.2 to 2.6.25/26 by Stefan Roese <sr@denx.de>
- * Copyright 2008 DENX Software Engineering
- *
- * Based on versions provided by AMCC and Synopsys which are:
- *          Copyright 2006 Applied Micro Circuits Corporation
- *          COPYRIGHT (C) 2005  SYNOPSYS, INC.  ALL RIGHTS RESERVED
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-/*
- * SATA support based on the chip canyonlands.
- *
- * 04-17-2009
- *             The local version of this driver for the canyonlands board
- *             does not use interrupts but polls the chip instead.
- */
-
-#include <common.h>
-#include <command.h>
-#include <pci.h>
-#include <asm/processor.h>
-#include <linux/dma-direction.h>
-#include <linux/errno.h>
-#include <asm/io.h>
-#include <malloc.h>
-#include <ata.h>
-#include <sata.h>
-#include <linux/ctype.h>
-
-#include "sata_dwc.h"
-
-#define DMA_NUM_CHANS                  1
-#define DMA_NUM_CHAN_REGS              8
-
-#define AHB_DMA_BRST_DFLT              16
-
-struct dmareg {
-       u32 low;
-       u32 high;
-};
-
-struct dma_chan_regs {
-       struct dmareg sar;
-       struct dmareg dar;
-       struct dmareg llp;
-       struct dmareg ctl;
-       struct dmareg sstat;
-       struct dmareg dstat;
-       struct dmareg sstatar;
-       struct dmareg dstatar;
-       struct dmareg cfg;
-       struct dmareg sgr;
-       struct dmareg dsr;
-};
-
-struct dma_interrupt_regs {
-       struct dmareg tfr;
-       struct dmareg block;
-       struct dmareg srctran;
-       struct dmareg dsttran;
-       struct dmareg error;
-};
-
-struct ahb_dma_regs {
-       struct dma_chan_regs    chan_regs[DMA_NUM_CHAN_REGS];
-       struct dma_interrupt_regs       interrupt_raw;
-       struct dma_interrupt_regs       interrupt_status;
-       struct dma_interrupt_regs       interrupt_mask;
-       struct dma_interrupt_regs       interrupt_clear;
-       struct dmareg                   statusInt;
-       struct dmareg                   rq_srcreg;
-       struct dmareg                   rq_dstreg;
-       struct dmareg                   rq_sgl_srcreg;
-       struct dmareg                   rq_sgl_dstreg;
-       struct dmareg                   rq_lst_srcreg;
-       struct dmareg                   rq_lst_dstreg;
-       struct dmareg                   dma_cfg;
-       struct dmareg                   dma_chan_en;
-       struct dmareg                   dma_id;
-       struct dmareg                   dma_test;
-       struct dmareg                   res1;
-       struct dmareg                   res2;
-       /* DMA Comp Params
-        * Param 6 = dma_param[0], Param 5 = dma_param[1],
-        * Param 4 = dma_param[2] ...
-        */
-       struct dmareg                   dma_params[6];
-};
-
-#define DMA_EN                 0x00000001
-#define DMA_DI                 0x00000000
-#define DMA_CHANNEL(ch)                (0x00000001 << (ch))
-#define DMA_ENABLE_CHAN(ch)    ((0x00000001 << (ch)) | \
-                               ((0x000000001 << (ch)) << 8))
-#define DMA_DISABLE_CHAN(ch)   (0x00000000 |   \
-                               ((0x000000001 << (ch)) << 8))
-
-#define SATA_DWC_MAX_PORTS     1
-#define SATA_DWC_SCR_OFFSET    0x24
-#define SATA_DWC_REG_OFFSET    0x64
-
-struct sata_dwc_regs {
-       u32 fptagr;
-       u32 fpbor;
-       u32 fptcr;
-       u32 dmacr;
-       u32 dbtsr;
-       u32 intpr;
-       u32 intmr;
-       u32 errmr;
-       u32 llcr;
-       u32 phycr;
-       u32 physr;
-       u32 rxbistpd;
-       u32 rxbistpd1;
-       u32 rxbistpd2;
-       u32 txbistpd;
-       u32 txbistpd1;
-       u32 txbistpd2;
-       u32 bistcr;
-       u32 bistfctr;
-       u32 bistsr;
-       u32 bistdecr;
-       u32 res[15];
-       u32 testr;
-       u32 versionr;
-       u32 idr;
-       u32 unimpl[192];
-       u32 dmadr[256];
-};
-
-#define SATA_DWC_TXFIFO_DEPTH          0x01FF
-#define SATA_DWC_RXFIFO_DEPTH          0x01FF
-
-#define SATA_DWC_DBTSR_MWR(size)       ((size / 4) & SATA_DWC_TXFIFO_DEPTH)
-#define SATA_DWC_DBTSR_MRD(size)       (((size / 4) &  \
-                                       SATA_DWC_RXFIFO_DEPTH) << 16)
-#define SATA_DWC_INTPR_DMAT            0x00000001
-#define SATA_DWC_INTPR_NEWFP           0x00000002
-#define SATA_DWC_INTPR_PMABRT          0x00000004
-#define SATA_DWC_INTPR_ERR             0x00000008
-#define SATA_DWC_INTPR_NEWBIST         0x00000010
-#define SATA_DWC_INTPR_IPF             0x10000000
-#define SATA_DWC_INTMR_DMATM           0x00000001
-#define SATA_DWC_INTMR_NEWFPM          0x00000002
-#define SATA_DWC_INTMR_PMABRTM         0x00000004
-#define SATA_DWC_INTMR_ERRM            0x00000008
-#define SATA_DWC_INTMR_NEWBISTM                0x00000010
-
-#define SATA_DWC_DMACR_TMOD_TXCHEN     0x00000004
-#define SATA_DWC_DMACR_TXRXCH_CLEAR    SATA_DWC_DMACR_TMOD_TXCHEN
-
-#define SATA_DWC_QCMD_MAX      32
-
-#define SATA_DWC_SERROR_ERR_BITS       0x0FFF0F03
-
-#define HSDEVP_FROM_AP(ap)     (struct sata_dwc_device_port*)  \
-                               (ap)->private_data
-
-struct sata_dwc_device {
-       struct device           *dev;
-       struct ata_probe_ent    *pe;
-       struct ata_host         *host;
-       u8                      *reg_base;
-       struct sata_dwc_regs    *sata_dwc_regs;
-       int                     irq_dma;
-};
-
-struct sata_dwc_device_port {
-       struct sata_dwc_device  *hsdev;
-       int                     cmd_issued[SATA_DWC_QCMD_MAX];
-       u32                     dma_chan[SATA_DWC_QCMD_MAX];
-       int                     dma_pending[SATA_DWC_QCMD_MAX];
-};
-
-enum {
-       SATA_DWC_CMD_ISSUED_NOT         = 0,
-       SATA_DWC_CMD_ISSUED_PEND        = 1,
-       SATA_DWC_CMD_ISSUED_EXEC        = 2,
-       SATA_DWC_CMD_ISSUED_NODATA      = 3,
-
-       SATA_DWC_DMA_PENDING_NONE       = 0,
-       SATA_DWC_DMA_PENDING_TX         = 1,
-       SATA_DWC_DMA_PENDING_RX         = 2,
-};
-
-#define msleep(a)      udelay(a * 1000)
-#define ssleep(a)      msleep(a * 1000)
-
-static int ata_probe_timeout = (ATA_TMOUT_INTERNAL / 100);
-
-enum sata_dev_state {
-       SATA_INIT = 0,
-       SATA_READY = 1,
-       SATA_NODEVICE = 2,
-       SATA_ERROR = 3,
-};
-enum sata_dev_state dev_state = SATA_INIT;
-
-static struct ahb_dma_regs             *sata_dma_regs = 0;
-static struct ata_host                 *phost;
-static struct ata_port                 ap;
-static struct ata_port                 *pap = &ap;
-static struct ata_device               ata_device;
-static struct sata_dwc_device_port     dwc_devp;
-
-static void    *scr_addr_sstatus;
-static u32     temp_n_block = 0;
-
-static unsigned ata_exec_internal(struct ata_device *dev,
-                       struct ata_taskfile *tf, const u8 *cdb,
-                       int dma_dir, unsigned int buflen,
-                       unsigned long timeout);
-static unsigned int ata_dev_set_feature(struct ata_device *dev,
-                       u8 enable,u8 feature);
-static unsigned int ata_dev_init_params(struct ata_device *dev,
-                       u16 heads, u16 sectors);
-static u8 ata_irq_on(struct ata_port *ap);
-static struct ata_queued_cmd *__ata_qc_from_tag(struct ata_port *ap,
-                       unsigned int tag);
-static int ata_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
-                       u8 status, int in_wq);
-static void ata_tf_to_host(struct ata_port *ap,
-                       const struct ata_taskfile *tf);
-static void ata_exec_command(struct ata_port *ap,
-                       const struct ata_taskfile *tf);
-static unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc);
-static u8 ata_check_altstatus(struct ata_port *ap);
-static u8 ata_check_status(struct ata_port *ap);
-static void ata_dev_select(struct ata_port *ap, unsigned int device,
-                       unsigned int wait, unsigned int can_sleep);
-static void ata_qc_issue(struct ata_queued_cmd *qc);
-static void ata_tf_load(struct ata_port *ap,
-                       const struct ata_taskfile *tf);
-static int ata_dev_read_sectors(unsigned char* pdata,
-                       unsigned long datalen, u32 block, u32 n_block);
-static int ata_dev_write_sectors(unsigned char* pdata,
-                       unsigned long datalen , u32 block, u32 n_block);
-static void ata_std_dev_select(struct ata_port *ap, unsigned int device);
-static void ata_qc_complete(struct ata_queued_cmd *qc);
-static void __ata_qc_complete(struct ata_queued_cmd *qc);
-static void fill_result_tf(struct ata_queued_cmd *qc);
-static void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
-static void ata_mmio_data_xfer(struct ata_device *dev,
-                       unsigned char *buf,
-                       unsigned int buflen,int do_write);
-static void ata_pio_task(struct ata_port *arg_ap);
-static void __ata_port_freeze(struct ata_port *ap);
-static int ata_port_freeze(struct ata_port *ap);
-static void ata_qc_free(struct ata_queued_cmd *qc);
-static void ata_pio_sectors(struct ata_queued_cmd *qc);
-static void ata_pio_sector(struct ata_queued_cmd *qc);
-static void ata_pio_queue_task(struct ata_port *ap,
-                       void *data,unsigned long delay);
-static void ata_hsm_qc_complete(struct ata_queued_cmd *qc, int in_wq);
-static int sata_dwc_softreset(struct ata_port *ap);
-static int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
-               unsigned int flags, u16 *id);
-static int check_sata_dev_state(void);
-
-static const struct ata_port_info sata_dwc_port_info[] = {
-       {
-               .flags          = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
-                               ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING |
-                               ATA_FLAG_SRST | ATA_FLAG_NCQ,
-               .pio_mask       = 0x1f,
-               .mwdma_mask     = 0x07,
-               .udma_mask      = 0x7f,
-       },
-};
-
-int init_sata(int dev)
-{
-       struct sata_dwc_device hsdev;
-       struct ata_host host;
-       struct ata_port_info pi = sata_dwc_port_info[0];
-       struct ata_link *link;
-       struct sata_dwc_device_port hsdevp = dwc_devp;
-       u8 *base = 0;
-       u8 *sata_dma_regs_addr = 0;
-       u8 status;
-       unsigned long base_addr = 0;
-       int chan = 0;
-       int rc;
-       int i;
-
-       phost = &host;
-
-       base = (u8*)SATA_BASE_ADDR;
-
-       hsdev.sata_dwc_regs = (void *__iomem)(base + SATA_DWC_REG_OFFSET);
-
-       host.n_ports = SATA_DWC_MAX_PORTS;
-
-       for (i = 0; i < SATA_DWC_MAX_PORTS; i++) {
-               ap.pflags |= ATA_PFLAG_INITIALIZING;
-               ap.flags = ATA_FLAG_DISABLED;
-               ap.print_id = -1;
-               ap.ctl = ATA_DEVCTL_OBS;
-               ap.host = &host;
-               ap.last_ctl = 0xFF;
-
-               link = &ap.link;
-               link->ap = &ap;
-               link->pmp = 0;
-               link->active_tag = ATA_TAG_POISON;
-               link->hw_sata_spd_limit = 0;
-
-               ap.port_no = i;
-               host.ports[i] = &ap;
-       }
-
-       ap.pio_mask = pi.pio_mask;
-       ap.mwdma_mask = pi.mwdma_mask;
-       ap.udma_mask = pi.udma_mask;
-       ap.flags |= pi.flags;
-       ap.link.flags |= pi.link_flags;
-
-       host.ports[0]->ioaddr.cmd_addr = base;
-       host.ports[0]->ioaddr.scr_addr = base + SATA_DWC_SCR_OFFSET;
-       scr_addr_sstatus = base + SATA_DWC_SCR_OFFSET;
-
-       base_addr = (unsigned long)base;
-
-       host.ports[0]->ioaddr.cmd_addr = (void *)base_addr + 0x00;
-       host.ports[0]->ioaddr.data_addr = (void *)base_addr + 0x00;
-
-       host.ports[0]->ioaddr.error_addr = (void *)base_addr + 0x04;
-       host.ports[0]->ioaddr.feature_addr = (void *)base_addr + 0x04;
-
-       host.ports[0]->ioaddr.nsect_addr = (void *)base_addr + 0x08;
-
-       host.ports[0]->ioaddr.lbal_addr = (void *)base_addr + 0x0c;
-       host.ports[0]->ioaddr.lbam_addr = (void *)base_addr + 0x10;
-       host.ports[0]->ioaddr.lbah_addr = (void *)base_addr + 0x14;
-
-       host.ports[0]->ioaddr.device_addr = (void *)base_addr + 0x18;
-       host.ports[0]->ioaddr.command_addr = (void *)base_addr + 0x1c;
-       host.ports[0]->ioaddr.status_addr = (void *)base_addr + 0x1c;
-
-       host.ports[0]->ioaddr.altstatus_addr = (void *)base_addr + 0x20;
-       host.ports[0]->ioaddr.ctl_addr = (void *)base_addr + 0x20;
-
-       sata_dma_regs_addr = (u8*)SATA_DMA_REG_ADDR;
-       sata_dma_regs = (void *__iomem)sata_dma_regs_addr;
-
-       status = ata_check_altstatus(&ap);
-
-       if (status == 0x7f) {
-               printf("Hard Disk not found.\n");
-               dev_state = SATA_NODEVICE;
-               rc = false;
-               return rc;
-       }
-
-       printf("Waiting for device...");
-       i = 0;
-       while (1) {
-               udelay(10000);
-
-               status = ata_check_altstatus(&ap);
-
-               if ((status & ATA_BUSY) == 0) {
-                       printf("\n");
-                       break;
-               }
-
-               i++;
-               if (i > (ATA_RESET_TIME * 100)) {
-                       printf("** TimeOUT **\n");
-
-                       dev_state = SATA_NODEVICE;
-                       rc = false;
-                       return rc;
-               }
-               if ((i >= 100) && ((i % 100) == 0))
-                       printf(".");
-       }
-
-       rc = sata_dwc_softreset(&ap);
-
-       if (rc) {
-               printf("sata_dwc : error. soft reset failed\n");
-               return rc;
-       }
-
-       for (chan = 0; chan < DMA_NUM_CHANS; chan++) {
-               out_le32(&(sata_dma_regs->interrupt_mask.error.low),
-                               DMA_DISABLE_CHAN(chan));
-
-               out_le32(&(sata_dma_regs->interrupt_mask.tfr.low),
-                               DMA_DISABLE_CHAN(chan));
-       }
-
-       out_le32(&(sata_dma_regs->dma_cfg.low), DMA_DI);
-
-       out_le32(&hsdev.sata_dwc_regs->intmr,
-               SATA_DWC_INTMR_ERRM |
-               SATA_DWC_INTMR_PMABRTM);
-
-       /* Unmask the error bits that should trigger
-        * an error interrupt by setting the error mask register.
-        */
-       out_le32(&hsdev.sata_dwc_regs->errmr, SATA_DWC_SERROR_ERR_BITS);
-
-       hsdev.host = ap.host;
-       memset(&hsdevp, 0, sizeof(hsdevp));
-       hsdevp.hsdev = &hsdev;
-
-       for (i = 0; i < SATA_DWC_QCMD_MAX; i++)
-               hsdevp.cmd_issued[i] = SATA_DWC_CMD_ISSUED_NOT;
-
-       out_le32((void __iomem *)scr_addr_sstatus + 4,
-               in_le32((void __iomem *)scr_addr_sstatus + 4));
-
-       rc = 0;
-       return rc;
-}
-
-int reset_sata(int dev)
-{
-       return 0;
-}
-
-static u8 ata_check_altstatus(struct ata_port *ap)
-{
-       u8 val = 0;
-       val = readb(ap->ioaddr.altstatus_addr);
-       return val;
-}
-
-static int sata_dwc_softreset(struct ata_port *ap)
-{
-       u8 nsect,lbal = 0;
-       u8 tmp = 0;
-       struct ata_ioports *ioaddr = &ap->ioaddr;
-
-       in_le32((void *)ap->ioaddr.scr_addr + (SCR_ERROR * 4));
-
-       writeb(0x55, ioaddr->nsect_addr);
-       writeb(0xaa, ioaddr->lbal_addr);
-       writeb(0xaa, ioaddr->nsect_addr);
-       writeb(0x55, ioaddr->lbal_addr);
-       writeb(0x55, ioaddr->nsect_addr);
-       writeb(0xaa, ioaddr->lbal_addr);
-
-       nsect = readb(ioaddr->nsect_addr);
-       lbal = readb(ioaddr->lbal_addr);
-
-       if ((nsect == 0x55) && (lbal == 0xaa)) {
-               printf("Device found\n");
-       } else {
-               printf("No device found\n");
-               dev_state = SATA_NODEVICE;
-               return false;
-       }
-
-       tmp = ATA_DEVICE_OBS;
-       writeb(tmp, ioaddr->device_addr);
-       writeb(ap->ctl, ioaddr->ctl_addr);
-
-       udelay(200);
-
-       writeb(ap->ctl | ATA_SRST, ioaddr->ctl_addr);
-
-       udelay(200);
-       writeb(ap->ctl, ioaddr->ctl_addr);
-
-       msleep(150);
-       ata_check_status(ap);
-
-       msleep(50);
-       ata_check_status(ap);
-
-       while (1) {
-               u8 status = ata_check_status(ap);
-
-               if (!(status & ATA_BUSY))
-                       break;
-
-               printf("Hard Disk status is BUSY.\n");
-               msleep(50);
-       }
-
-       tmp = ATA_DEVICE_OBS;
-       writeb(tmp, ioaddr->device_addr);
-
-       nsect = readb(ioaddr->nsect_addr);
-       lbal = readb(ioaddr->lbal_addr);
-
-       return 0;
-}
-
-static u8 ata_check_status(struct ata_port *ap)
-{
-       u8 val = 0;
-       val = readb(ap->ioaddr.status_addr);
-       return val;
-}
-
-static int ata_id_has_hipm(const u16 *id)
-{
-       u16 val = id[76];
-
-       if (val == 0 || val == 0xffff)
-               return -1;
-
-       return val & (1 << 9);
-}
-
-static int ata_id_has_dipm(const u16 *id)
-{
-       u16 val = id[78];
-
-       if (val == 0 || val == 0xffff)
-               return -1;
-
-       return val & (1 << 3);
-}
-
-int scan_sata(int dev)
-{
-       int i;
-       int rc;
-       u8 status;
-       const u16 *id;
-       struct ata_device *ata_dev = &ata_device;
-       unsigned long pio_mask, mwdma_mask;
-       char revbuf[7];
-       u16 iobuf[ATA_SECTOR_WORDS];
-
-       memset(iobuf, 0, sizeof(iobuf));
-
-       if (dev_state == SATA_NODEVICE)
-               return 1;
-
-       printf("Waiting for device...");
-       i = 0;
-       while (1) {
-               udelay(10000);
-
-               status = ata_check_altstatus(&ap);
-
-               if ((status & ATA_BUSY) == 0) {
-                       printf("\n");
-                       break;
-               }
-
-               i++;
-               if (i > (ATA_RESET_TIME * 100)) {
-                       printf("** TimeOUT **\n");
-
-                       dev_state = SATA_NODEVICE;
-                       return 1;
-               }
-               if ((i >= 100) && ((i % 100) == 0))
-                       printf(".");
-       }
-
-       udelay(1000);
-
-       rc = ata_dev_read_id(ata_dev, &ata_dev->class,
-                       ATA_READID_POSTRESET,ata_dev->id);
-       if (rc) {
-               printf("sata_dwc : error. failed sata scan\n");
-               return 1;
-       }
-
-       /* SATA drives indicate we have a bridge. We don't know which
-        * end of the link the bridge is which is a problem
-        */
-       if (ata_id_is_sata(ata_dev->id))
-               ap.cbl = ATA_CBL_SATA;
-
-       id = ata_dev->id;
-
-       ata_dev->flags &= ~ATA_DFLAG_CFG_MASK;
-       ata_dev->max_sectors = 0;
-       ata_dev->cdb_len = 0;
-       ata_dev->n_sectors = 0;
-       ata_dev->cylinders = 0;
-       ata_dev->heads = 0;
-       ata_dev->sectors = 0;
-
-       if (id[ATA_ID_FIELD_VALID] & (1 << 1)) {
-               pio_mask = id[ATA_ID_PIO_MODES] & 0x03;
-               pio_mask <<= 3;
-               pio_mask |= 0x7;
-       } else {
-               /* If word 64 isn't valid then Word 51 high byte holds
-                * the PIO timing number for the maximum. Turn it into
-                * a mask.
-                */
-               u8 mode = (id[ATA_ID_OLD_PIO_MODES] >> 8) & 0xFF;
-               if (mode < 5) {
-                       pio_mask = (2 << mode) - 1;
-               } else {
-                       pio_mask = 1;
-               }
-       }
-
-       mwdma_mask = id[ATA_ID_MWDMA_MODES] & 0x07;
-
-       if (ata_id_is_cfa(id)) {
-               int pio = id[163] & 0x7;
-               int dma = (id[163] >> 3) & 7;
-
-               if (pio)
-                       pio_mask |= (1 << 5);
-               if (pio > 1)
-                       pio_mask |= (1 << 6);
-               if (dma)
-                       mwdma_mask |= (1 << 3);
-               if (dma > 1)
-                       mwdma_mask |= (1 << 4);
-       }
-
-       if (ata_dev->class == ATA_DEV_ATA) {
-               if (ata_id_is_cfa(id)) {
-                       if (id[162] & 1)
-                               printf("supports DRM functions and may "
-                                       "not be fully accessable.\n");
-                       strcpy(revbuf, "CFA");
-               } else {
-                       if (ata_id_has_tpm(id))
-                               printf("supports DRM functions and may "
-                                               "not be fully accessable.\n");
-               }
-
-               ata_dev->n_sectors = ata_id_n_sectors((u16*)id);
-
-               if (ata_dev->id[59] & 0x100)
-                       ata_dev->multi_count = ata_dev->id[59] & 0xff;
-
-               if (ata_id_has_lba(id)) {
-                       char ncq_desc[20];
-
-                       ata_dev->flags |= ATA_DFLAG_LBA;
-                       if (ata_id_has_lba48(id)) {
-                               ata_dev->flags |= ATA_DFLAG_LBA48;
-
-                               if (ata_dev->n_sectors >= (1UL << 28) &&
-                                       ata_id_has_flush_ext(id))
-                                       ata_dev->flags |= ATA_DFLAG_FLUSH_EXT;
-                       }
-                       if (!ata_id_has_ncq(ata_dev->id))
-                               ncq_desc[0] = '\0';
-
-                       if (ata_dev->horkage & ATA_HORKAGE_NONCQ)
-                               strcpy(ncq_desc, "NCQ (not used)");
-
-                       if (ap.flags & ATA_FLAG_NCQ)
-                               ata_dev->flags |= ATA_DFLAG_NCQ;
-               }
-               ata_dev->cdb_len = 16;
-       }
-       ata_dev->max_sectors = ATA_MAX_SECTORS;
-       if (ata_dev->flags & ATA_DFLAG_LBA48)
-               ata_dev->max_sectors = ATA_MAX_SECTORS_LBA48;
-
-       if (!(ata_dev->horkage & ATA_HORKAGE_IPM)) {
-               if (ata_id_has_hipm(ata_dev->id))
-                       ata_dev->flags |= ATA_DFLAG_HIPM;
-               if (ata_id_has_dipm(ata_dev->id))
-                       ata_dev->flags |= ATA_DFLAG_DIPM;
-       }
-
-       if ((ap.cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ata_dev->id))) {
-               ata_dev->udma_mask &= ATA_UDMA5;
-               ata_dev->max_sectors = ATA_MAX_SECTORS;
-       }
-
-       if (ata_dev->horkage & ATA_HORKAGE_DIAGNOSTIC) {
-               printf("Drive reports diagnostics failure."
-                               "This may indicate a drive\n");
-               printf("fault or invalid emulation."
-                               "Contact drive vendor for information.\n");
-       }
-
-       rc = check_sata_dev_state();
-
-       ata_id_c_string(ata_dev->id,
-                       (unsigned char *)sata_dev_desc[dev].revision,
-                        ATA_ID_FW_REV, sizeof(sata_dev_desc[dev].revision));
-       ata_id_c_string(ata_dev->id,
-                       (unsigned char *)sata_dev_desc[dev].vendor,
-                        ATA_ID_PROD, sizeof(sata_dev_desc[dev].vendor));
-       ata_id_c_string(ata_dev->id,
-                       (unsigned char *)sata_dev_desc[dev].product,
-                        ATA_ID_SERNO, sizeof(sata_dev_desc[dev].product));
-
-       sata_dev_desc[dev].lba = (u32) ata_dev->n_sectors;
-
-#ifdef CONFIG_LBA48
-       if (ata_dev->id[83] & (1 << 10)) {
-               sata_dev_desc[dev].lba48 = 1;
-       } else {
-               sata_dev_desc[dev].lba48 = 0;
-       }
-#endif
-
-       return 0;
-}
-
-static u8 ata_busy_wait(struct ata_port *ap,
-               unsigned int bits,unsigned int max)
-{
-       u8 status;
-
-       do {
-               udelay(10);
-               status = ata_check_status(ap);
-               max--;
-       } while (status != 0xff && (status & bits) && (max > 0));
-
-       return status;
-}
-
-static int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
-               unsigned int flags, u16 *id)
-{
-       struct ata_port *ap = pap;
-       unsigned int class = *p_class;
-       struct ata_taskfile tf;
-       unsigned int err_mask = 0;
-       const char *reason;
-       int may_fallback = 1, tried_spinup = 0;
-       u8 status;
-       int rc;
-
-       status = ata_busy_wait(ap, ATA_BUSY, 30000);
-       if (status & ATA_BUSY) {
-               printf("BSY = 0 check. timeout.\n");
-               rc = false;
-               return rc;
-       }
-
-       ata_dev_select(ap, dev->devno, 1, 1);
-
-retry:
-       memset(&tf, 0, sizeof(tf));
-       ap->print_id = 1;
-       ap->flags &= ~ATA_FLAG_DISABLED;
-       tf.ctl = ap->ctl;
-       tf.device = ATA_DEVICE_OBS;
-       tf.command = ATA_CMD_ID_ATA;
-       tf.protocol = ATA_PROT_PIO;
-
-       /* Some devices choke if TF registers contain garbage.  Make
-        * sure those are properly initialized.
-        */
-       tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
-
-       /* Device presence detection is unreliable on some
-        * controllers.  Always poll IDENTIFY if available.
-        */
-       tf.flags |= ATA_TFLAG_POLLING;
-
-       temp_n_block = 1;
-
-       err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE,
-                                       sizeof(id[0]) * ATA_ID_WORDS, 0);
-
-       if (err_mask) {
-               if (err_mask & AC_ERR_NODEV_HINT) {
-                       printf("NODEV after polling detection\n");
-                       return -ENOENT;
-               }
-
-               if ((err_mask == AC_ERR_DEV) && (tf.feature & ATA_ABORTED)) {
-                       /* Device or controller might have reported
-                        * the wrong device class.  Give a shot at the
-                        * other IDENTIFY if the current one is
-                        * aborted by the device.
-                        */
-                       if (may_fallback) {
-                               may_fallback = 0;
-
-                               if (class == ATA_DEV_ATA) {
-                                       class = ATA_DEV_ATAPI;
-                               } else {
-                                       class = ATA_DEV_ATA;
-                               }
-                               goto retry;
-                       }
-                       /* Control reaches here iff the device aborted
-                        * both flavors of IDENTIFYs which happens
-                        * sometimes with phantom devices.
-                        */
-                       printf("both IDENTIFYs aborted, assuming NODEV\n");
-                       return -ENOENT;
-               }
-               rc = -EIO;
-               reason = "I/O error";
-               goto err_out;
-       }
-
-       /* Falling back doesn't make sense if ID data was read
-        * successfully at least once.
-        */
-       may_fallback = 0;
-
-       unsigned int id_cnt;
-
-       for (id_cnt = 0; id_cnt < ATA_ID_WORDS; id_cnt++)
-               id[id_cnt] = le16_to_cpu(id[id_cnt]);
-
-
-       rc = -EINVAL;
-       reason = "device reports invalid type";
-
-       if (class == ATA_DEV_ATA) {
-               if (!ata_id_is_ata(id) && !ata_id_is_cfa(id))
-                       goto err_out;
-       } else {
-               if (ata_id_is_ata(id))
-                       goto err_out;
-       }
-       if (!tried_spinup && (id[2] == 0x37c8 || id[2] == 0x738c)) {
-               tried_spinup = 1;
-               /*
-                * Drive powered-up in standby mode, and requires a specific
-                * SET_FEATURES spin-up subcommand before it will accept
-                * anything other than the original IDENTIFY command.
-                */
-               err_mask = ata_dev_set_feature(dev, SETFEATURES_SPINUP, 0);
-               if (err_mask && id[2] != 0x738c) {
-                       rc = -EIO;
-                       reason = "SPINUP failed";
-                       goto err_out;
-               }
-               /*
-                * If the drive initially returned incomplete IDENTIFY info,
-                * we now must reissue the IDENTIFY command.
-                */
-               if (id[2] == 0x37c8)
-                       goto retry;
-       }
-
-       if ((flags & ATA_READID_POSTRESET) && class == ATA_DEV_ATA) {
-               /*
-                * The exact sequence expected by certain pre-ATA4 drives is:
-                * SRST RESET
-                * IDENTIFY (optional in early ATA)
-                * INITIALIZE DEVICE PARAMETERS (later IDE and ATA)
-                * anything else..
-                * Some drives were very specific about that exact sequence.
-                *
-                * Note that ATA4 says lba is mandatory so the second check
-                * shoud never trigger.
-                */
-               if (ata_id_major_version(id) < 4 || !ata_id_has_lba(id)) {
-                       err_mask = ata_dev_init_params(dev, id[3], id[6]);
-                       if (err_mask) {
-                               rc = -EIO;
-                               reason = "INIT_DEV_PARAMS failed";
-                               goto err_out;
-                       }
-
-                       /* current CHS translation info (id[53-58]) might be
-                        * changed. reread the identify device info.
-                        */
-                       flags &= ~ATA_READID_POSTRESET;
-                       goto retry;
-               }
-       }
-
-       *p_class = class;
-       return 0;
-
-err_out:
-       printf("failed to READ ID (%s, err_mask=0x%x)\n", reason, err_mask);
-       return rc;
-}
-
-static u8 ata_wait_idle(struct ata_port *ap)
-{
-       u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
-       return status;
-}
-
-static void ata_dev_select(struct ata_port *ap, unsigned int device,
-               unsigned int wait, unsigned int can_sleep)
-{
-       if (wait)
-               ata_wait_idle(ap);
-
-       ata_std_dev_select(ap, device);
-
-       if (wait)
-               ata_wait_idle(ap);
-}
-
-static void ata_std_dev_select(struct ata_port *ap, unsigned int device)
-{
-       u8 tmp;
-
-       if (device == 0) {
-               tmp = ATA_DEVICE_OBS;
-       } else {
-               tmp = ATA_DEVICE_OBS | ATA_DEV1;
-       }
-
-       writeb(tmp, ap->ioaddr.device_addr);
-
-       readb(ap->ioaddr.altstatus_addr);
-
-       udelay(1);
-}
-
-static int waiting_for_reg_state(volatile u8 *offset,
-                               int timeout_msec,
-                               u32 sign)
-{
-       int i;
-       u32 status;
-
-       for (i = 0; i < timeout_msec; i++) {
-               status = readl(offset);
-               if ((status & sign) != 0)
-                       break;
-               msleep(1);
-       }
-
-       return (i < timeout_msec) ? 0 : -1;
-}
-
-static void ata_qc_reinit(struct ata_queued_cmd *qc)
-{
-       qc->dma_dir = DMA_NONE;
-       qc->flags = 0;
-       qc->nbytes = qc->extrabytes = qc->curbytes = 0;
-       qc->n_elem = 0;
-       qc->err_mask = 0;
-       qc->sect_size = ATA_SECT_SIZE;
-       qc->nbytes = ATA_SECT_SIZE * temp_n_block;
-
-       memset(&qc->tf, 0, sizeof(qc->tf));
-       qc->tf.ctl = 0;
-       qc->tf.device = ATA_DEVICE_OBS;
-
-       qc->result_tf.command = ATA_DRDY;
-       qc->result_tf.feature = 0;
-}
-
-struct ata_queued_cmd *__ata_qc_from_tag(struct ata_port *ap,
-                                       unsigned int tag)
-{
-       if (tag < ATA_MAX_QUEUE)
-               return &ap->qcmd[tag];
-       return NULL;
-}
-
-static void __ata_port_freeze(struct ata_port *ap)
-{
-       printf("set port freeze.\n");
-       ap->pflags |= ATA_PFLAG_FROZEN;
-}
-
-static int ata_port_freeze(struct ata_port *ap)
-{
-       __ata_port_freeze(ap);
-       return 0;
-}
-
-unsigned ata_exec_internal(struct ata_device *dev,
-                       struct ata_taskfile *tf, const u8 *cdb,
-                       int dma_dir, unsigned int buflen,
-                       unsigned long timeout)
-{
-       struct ata_link *link = dev->link;
-       struct ata_port *ap = pap;
-       struct ata_queued_cmd *qc;
-       unsigned int tag, preempted_tag;
-       u32 preempted_sactive, preempted_qc_active;
-       int preempted_nr_active_links;
-       unsigned int err_mask;
-       int rc = 0;
-       u8 status;
-
-       status = ata_busy_wait(ap, ATA_BUSY, 300000);
-       if (status & ATA_BUSY) {
-               printf("BSY = 0 check. timeout.\n");
-               rc = false;
-               return rc;
-       }
-
-       if (ap->pflags & ATA_PFLAG_FROZEN)
-               return AC_ERR_SYSTEM;
-
-       tag = ATA_TAG_INTERNAL;
-
-       if (test_and_set_bit(tag, &ap->qc_allocated)) {
-               rc = false;
-               return rc;
-       }
-
-       qc = __ata_qc_from_tag(ap, tag);
-       qc->tag = tag;
-       qc->ap = ap;
-       qc->dev = dev;
-
-       ata_qc_reinit(qc);
-
-       preempted_tag = link->active_tag;
-       preempted_sactive = link->sactive;
-       preempted_qc_active = ap->qc_active;
-       preempted_nr_active_links = ap->nr_active_links;
-       link->active_tag = ATA_TAG_POISON;
-       link->sactive = 0;
-       ap->qc_active = 0;
-       ap->nr_active_links = 0;
-
-       qc->tf = *tf;
-       if (cdb)
-               memcpy(qc->cdb, cdb, ATAPI_CDB_LEN);
-       qc->flags |= ATA_QCFLAG_RESULT_TF;
-       qc->dma_dir = dma_dir;
-       qc->private_data = 0;
-
-       ata_qc_issue(qc);
-
-       if (!timeout)
-               timeout = ata_probe_timeout * 1000 / HZ;
-
-       status = ata_busy_wait(ap, ATA_BUSY, 30000);
-       if (status & ATA_BUSY) {
-               printf("BSY = 0 check. timeout.\n");
-               printf("altstatus = 0x%x.\n", status);
-               qc->err_mask |= AC_ERR_OTHER;
-               return qc->err_mask;
-       }
-
-       if (waiting_for_reg_state(ap->ioaddr.altstatus_addr, 1000, 0x8)) {
-               u8 status = 0;
-               u8 errorStatus = 0;
-
-               status = readb(ap->ioaddr.altstatus_addr);
-               if ((status & 0x01) != 0) {
-                       errorStatus = readb(ap->ioaddr.feature_addr);
-                       if (errorStatus == 0x04 &&
-                               qc->tf.command == ATA_CMD_PIO_READ_EXT){
-                               printf("Hard Disk doesn't support LBA48\n");
-                               dev_state = SATA_ERROR;
-                               qc->err_mask |= AC_ERR_OTHER;
-                               return qc->err_mask;
-                       }
-               }
-               qc->err_mask |= AC_ERR_OTHER;
-               return qc->err_mask;
-       }
-
-       status = ata_busy_wait(ap, ATA_BUSY, 10);
-       if (status & ATA_BUSY) {
-               printf("BSY = 0 check. timeout.\n");
-               qc->err_mask |= AC_ERR_OTHER;
-               return qc->err_mask;
-       }
-
-       ata_pio_task(ap);
-
-       if (!rc) {
-               if (qc->flags & ATA_QCFLAG_ACTIVE) {
-                       qc->err_mask |= AC_ERR_TIMEOUT;
-                       ata_port_freeze(ap);
-               }
-       }
-
-       if (qc->flags & ATA_QCFLAG_FAILED) {
-               if (qc->result_tf.command & (ATA_ERR | ATA_DF))
-                       qc->err_mask |= AC_ERR_DEV;
-
-               if (!qc->err_mask)
-                       qc->err_mask |= AC_ERR_OTHER;
-
-               if (qc->err_mask & ~AC_ERR_OTHER)
-                       qc->err_mask &= ~AC_ERR_OTHER;
-       }
-
-       *tf = qc->result_tf;
-       err_mask = qc->err_mask;
-       ata_qc_free(qc);
-       link->active_tag = preempted_tag;
-       link->sactive = preempted_sactive;
-       ap->qc_active = preempted_qc_active;
-       ap->nr_active_links = preempted_nr_active_links;
-
-       if (ap->flags & ATA_FLAG_DISABLED) {
-               err_mask |= AC_ERR_SYSTEM;
-               ap->flags &= ~ATA_FLAG_DISABLED;
-       }
-
-       return err_mask;
-}
-
-static void ata_qc_issue(struct ata_queued_cmd *qc)
-{
-       struct ata_port *ap = qc->ap;
-       struct ata_link *link = qc->dev->link;
-       u8 prot = qc->tf.protocol;
-
-       if (ata_is_ncq(prot)) {
-               if (!link->sactive)
-                       ap->nr_active_links++;
-               link->sactive |= 1 << qc->tag;
-       } else {
-               ap->nr_active_links++;
-               link->active_tag = qc->tag;
-       }
-
-       qc->flags |= ATA_QCFLAG_ACTIVE;
-       ap->qc_active |= 1 << qc->tag;
-
-       if (qc->dev->flags & ATA_DFLAG_SLEEPING) {
-               msleep(1);
-               return;
-       }
-
-       qc->err_mask |= ata_qc_issue_prot(qc);
-       if (qc->err_mask)
-               goto err;
-
-       return;
-err:
-       ata_qc_complete(qc);
-}
-
-static unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
-{
-       struct ata_port *ap = qc->ap;
-
-       if (ap->flags & ATA_FLAG_PIO_POLLING) {
-               switch (qc->tf.protocol) {
-               case ATA_PROT_PIO:
-               case ATA_PROT_NODATA:
-               case ATAPI_PROT_PIO:
-               case ATAPI_PROT_NODATA:
-                       qc->tf.flags |= ATA_TFLAG_POLLING;
-                       break;
-               default:
-                       break;
-               }
-       }
-
-       ata_dev_select(ap, qc->dev->devno, 1, 0);
-
-       switch (qc->tf.protocol) {
-       case ATA_PROT_PIO:
-               if (qc->tf.flags & ATA_TFLAG_POLLING)
-                       qc->tf.ctl |= ATA_NIEN;
-
-               ata_tf_to_host(ap, &qc->tf);
-
-               ap->hsm_task_state = HSM_ST;
-
-               if (qc->tf.flags & ATA_TFLAG_POLLING)
-                       ata_pio_queue_task(ap, qc, 0);
-
-               break;
-
-       default:
-               return AC_ERR_SYSTEM;
-       }
-
-       return 0;
-}
-
-static void ata_tf_to_host(struct ata_port *ap,
-                       const struct ata_taskfile *tf)
-{
-       ata_tf_load(ap, tf);
-       ata_exec_command(ap, tf);
-}
-
-static void ata_tf_load(struct ata_port *ap,
-                       const struct ata_taskfile *tf)
-{
-       struct ata_ioports *ioaddr = &ap->ioaddr;
-       unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
-
-       if (tf->ctl != ap->last_ctl) {
-               if (ioaddr->ctl_addr)
-                       writeb(tf->ctl, ioaddr->ctl_addr);
-               ap->last_ctl = tf->ctl;
-               ata_wait_idle(ap);
-       }
-
-       if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
-               writeb(tf->hob_feature, ioaddr->feature_addr);
-               writeb(tf->hob_nsect, ioaddr->nsect_addr);
-               writeb(tf->hob_lbal, ioaddr->lbal_addr);
-               writeb(tf->hob_lbam, ioaddr->lbam_addr);
-               writeb(tf->hob_lbah, ioaddr->lbah_addr);
-       }
-
-       if (is_addr) {
-               writeb(tf->feature, ioaddr->feature_addr);
-               writeb(tf->nsect, ioaddr->nsect_addr);
-               writeb(tf->lbal, ioaddr->lbal_addr);
-               writeb(tf->lbam, ioaddr->lbam_addr);
-               writeb(tf->lbah, ioaddr->lbah_addr);
-       }
-
-       if (tf->flags & ATA_TFLAG_DEVICE)
-               writeb(tf->device, ioaddr->device_addr);
-
-       ata_wait_idle(ap);
-}
-
-static void ata_exec_command(struct ata_port *ap,
-                       const struct ata_taskfile *tf)
-{
-       writeb(tf->command, ap->ioaddr.command_addr);
-
-       readb(ap->ioaddr.altstatus_addr);
-
-       udelay(1);
-}
-
-static void ata_pio_queue_task(struct ata_port *ap,
-                       void *data,unsigned long delay)
-{
-       ap->port_task_data = data;
-}
-
-static unsigned int ac_err_mask(u8 status)
-{
-       if (status & (ATA_BUSY | ATA_DRQ))
-               return AC_ERR_HSM;
-       if (status & (ATA_ERR | ATA_DF))
-               return AC_ERR_DEV;
-       return 0;
-}
-
-static unsigned int __ac_err_mask(u8 status)
-{
-       unsigned int mask = ac_err_mask(status);
-       if (mask == 0)
-               return AC_ERR_OTHER;
-       return mask;
-}
-
-static void ata_pio_task(struct ata_port *arg_ap)
-{
-       struct ata_port *ap = arg_ap;
-       struct ata_queued_cmd *qc = ap->port_task_data;
-       u8 status;
-       int poll_next;
-
-fsm_start:
-       /*
-        * This is purely heuristic.  This is a fast path.
-        * Sometimes when we enter, BSY will be cleared in
-        * a chk-status or two.  If not, the drive is probably seeking
-        * or something.  Snooze for a couple msecs, then
-        * chk-status again.  If still busy, queue delayed work.
-        */
-       status = ata_busy_wait(ap, ATA_BUSY, 5);
-       if (status & ATA_BUSY) {
-               msleep(2);
-               status = ata_busy_wait(ap, ATA_BUSY, 10);
-               if (status & ATA_BUSY) {
-                       ata_pio_queue_task(ap, qc, ATA_SHORT_PAUSE);
-                       return;
-               }
-       }
-
-       poll_next = ata_hsm_move(ap, qc, status, 1);
-
-       /* another command or interrupt handler
-        * may be running at this point.
-        */
-       if (poll_next)
-               goto fsm_start;
-}
-
-static int ata_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
-                       u8 status, int in_wq)
-{
-       int poll_next;
-
-fsm_start:
-       switch (ap->hsm_task_state) {
-       case HSM_ST_FIRST:
-               poll_next = (qc->tf.flags & ATA_TFLAG_POLLING);
-
-               if ((status & ATA_DRQ) == 0) {
-                       if (status & (ATA_ERR | ATA_DF)) {
-                               qc->err_mask |= AC_ERR_DEV;
-                       } else {
-                               qc->err_mask |= AC_ERR_HSM;
-                       }
-                       ap->hsm_task_state = HSM_ST_ERR;
-                       goto fsm_start;
-               }
-
-               /* Device should not ask for data transfer (DRQ=1)
-                * when it finds something wrong.
-                * We ignore DRQ here and stop the HSM by
-                * changing hsm_task_state to HSM_ST_ERR and
-                * let the EH abort the command or reset the device.
-                */
-               if (status & (ATA_ERR | ATA_DF)) {
-                       if (!(qc->dev->horkage & ATA_HORKAGE_STUCK_ERR)) {
-                               printf("DRQ=1 with device error, "
-                                       "dev_stat 0x%X\n", status);
-                               qc->err_mask |= AC_ERR_HSM;
-                               ap->hsm_task_state = HSM_ST_ERR;
-                               goto fsm_start;
-                       }
-               }
-
-               if (qc->tf.protocol == ATA_PROT_PIO) {
-                       /* PIO data out protocol.
-                        * send first data block.
-                        */
-                       /* ata_pio_sectors() might change the state
-                        * to HSM_ST_LAST. so, the state is changed here
-                        * before ata_pio_sectors().
-                        */
-                       ap->hsm_task_state = HSM_ST;
-                       ata_pio_sectors(qc);
-               } else {
-                       printf("protocol is not ATA_PROT_PIO \n");
-               }
-               break;
-
-       case HSM_ST:
-               if ((status & ATA_DRQ) == 0) {
-                       if (status & (ATA_ERR | ATA_DF)) {
-                               qc->err_mask |= AC_ERR_DEV;
-                       } else {
-                               /* HSM violation. Let EH handle this.
-                                * Phantom devices also trigger this
-                                * condition.  Mark hint.
-                                */
-                               qc->err_mask |= AC_ERR_HSM | AC_ERR_NODEV_HINT;
-                       }
-
-                       ap->hsm_task_state = HSM_ST_ERR;
-                       goto fsm_start;
-               }
-               /* For PIO reads, some devices may ask for
-                * data transfer (DRQ=1) alone with ERR=1.
-                * We respect DRQ here and transfer one
-                * block of junk data before changing the
-                * hsm_task_state to HSM_ST_ERR.
-                *
-                * For PIO writes, ERR=1 DRQ=1 doesn't make
-                * sense since the data block has been
-                * transferred to the device.
-                */
-               if (status & (ATA_ERR | ATA_DF)) {
-                       qc->err_mask |= AC_ERR_DEV;
-
-                       if (!(qc->tf.flags & ATA_TFLAG_WRITE)) {
-                               ata_pio_sectors(qc);
-                               status = ata_wait_idle(ap);
-                       }
-
-                       if (status & (ATA_BUSY | ATA_DRQ))
-                               qc->err_mask |= AC_ERR_HSM;
-
-                       /* ata_pio_sectors() might change the
-                        * state to HSM_ST_LAST. so, the state
-                        * is changed after ata_pio_sectors().
-                        */
-                       ap->hsm_task_state = HSM_ST_ERR;
-                       goto fsm_start;
-               }
-
-               ata_pio_sectors(qc);
-               if (ap->hsm_task_state == HSM_ST_LAST &&
-                       (!(qc->tf.flags & ATA_TFLAG_WRITE))) {
-                       status = ata_wait_idle(ap);
-                       goto fsm_start;
-               }
-
-               poll_next = 1;
-               break;
-
-       case HSM_ST_LAST:
-               if (!ata_ok(status)) {
-                       qc->err_mask |= __ac_err_mask(status);
-                       ap->hsm_task_state = HSM_ST_ERR;
-                       goto fsm_start;
-               }
-
-               ap->hsm_task_state = HSM_ST_IDLE;
-
-               ata_hsm_qc_complete(qc, in_wq);
-
-               poll_next = 0;
-               break;
-
-       case HSM_ST_ERR:
-               /* make sure qc->err_mask is available to
-                * know what's wrong and recover
-                */
-               ap->hsm_task_state = HSM_ST_IDLE;
-
-               ata_hsm_qc_complete(qc, in_wq);
-
-               poll_next = 0;
-               break;
-       default:
-               poll_next = 0;
-       }
-
-       return poll_next;
-}
-
-static void ata_pio_sectors(struct ata_queued_cmd *qc)
-{
-       struct ata_port *ap;
-       ap = pap;
-       qc->pdata = ap->pdata;
-
-       ata_pio_sector(qc);
-
-       readb(qc->ap->ioaddr.altstatus_addr);
-       udelay(1);
-}
-
-static void ata_pio_sector(struct ata_queued_cmd *qc)
-{
-       int do_write = (qc->tf.flags & ATA_TFLAG_WRITE);
-       struct ata_port *ap = qc->ap;
-       unsigned int offset;
-       unsigned char *buf;
-       char temp_data_buf[512];
-
-       if (qc->curbytes == qc->nbytes - qc->sect_size)
-               ap->hsm_task_state = HSM_ST_LAST;
-
-       offset = qc->curbytes;
-
-       switch (qc->tf.command) {
-       case ATA_CMD_ID_ATA:
-               buf = (unsigned char *)&ata_device.id[0];
-               break;
-       case ATA_CMD_PIO_READ_EXT:
-       case ATA_CMD_PIO_READ:
-       case ATA_CMD_PIO_WRITE_EXT:
-       case ATA_CMD_PIO_WRITE:
-               buf = qc->pdata + offset;
-               break;
-       default:
-               buf = (unsigned char *)&temp_data_buf[0];
-       }
-
-       ata_mmio_data_xfer(qc->dev, buf, qc->sect_size, do_write);
-
-       qc->curbytes += qc->sect_size;
-
-}
-
-static void ata_mmio_data_xfer(struct ata_device *dev, unsigned char *buf,
-                               unsigned int buflen, int do_write)
-{
-       struct ata_port *ap = pap;
-       void __iomem *data_addr = ap->ioaddr.data_addr;
-       unsigned int words = buflen >> 1;
-       u16 *buf16 = (u16 *)buf;
-       unsigned int i = 0;
-
-       udelay(100);
-       if (do_write) {
-               for (i = 0; i < words; i++)
-                       writew(le16_to_cpu(buf16[i]), data_addr);
-       } else {
-               for (i = 0; i < words; i++)
-                       buf16[i] = cpu_to_le16(readw(data_addr));
-       }
-
-       if (buflen & 0x01) {
-               __le16 align_buf[1] = { 0 };
-               unsigned char *trailing_buf = buf + buflen - 1;
-
-               if (do_write) {
-                       memcpy(align_buf, trailing_buf, 1);
-                       writew(le16_to_cpu(align_buf[0]), data_addr);
-               } else {
-                       align_buf[0] = cpu_to_le16(readw(data_addr));
-                       memcpy(trailing_buf, align_buf, 1);
-               }
-       }
-}
-
-static void ata_hsm_qc_complete(struct ata_queued_cmd *qc, int in_wq)
-{
-       struct ata_port *ap = qc->ap;
-
-       if (in_wq) {
-               /* EH might have kicked in while host lock is
-                * released.
-                */
-               qc = &ap->qcmd[qc->tag];
-               if (qc) {
-                       if (!(qc->err_mask & AC_ERR_HSM)) {
-                               ata_irq_on(ap);
-                               ata_qc_complete(qc);
-                       } else {
-                               ata_port_freeze(ap);
-                       }
-               }
-       } else {
-               if (!(qc->err_mask & AC_ERR_HSM)) {
-                       ata_qc_complete(qc);
-               } else {
-                       ata_port_freeze(ap);
-               }
-       }
-}
-
-static u8 ata_irq_on(struct ata_port *ap)
-{
-       struct ata_ioports *ioaddr = &ap->ioaddr;
-       u8 tmp;
-
-       ap->ctl &= ~ATA_NIEN;
-       ap->last_ctl = ap->ctl;
-
-       if (ioaddr->ctl_addr)
-               writeb(ap->ctl, ioaddr->ctl_addr);
-
-       tmp = ata_wait_idle(ap);
-
-       return tmp;
-}
-
-static unsigned int ata_tag_internal(unsigned int tag)
-{
-       return tag == ATA_MAX_QUEUE - 1;
-}
-
-static void ata_qc_complete(struct ata_queued_cmd *qc)
-{
-       struct ata_device *dev = qc->dev;
-       if (qc->err_mask)
-               qc->flags |= ATA_QCFLAG_FAILED;
-
-       if (qc->flags & ATA_QCFLAG_FAILED) {
-               if (!ata_tag_internal(qc->tag)) {
-                       fill_result_tf(qc);
-                       return;
-               }
-       }
-       if (qc->flags & ATA_QCFLAG_RESULT_TF)
-               fill_result_tf(qc);
-
-       /* Some commands need post-processing after successful
-        * completion.
-        */
-       switch (qc->tf.command) {
-       case ATA_CMD_SET_FEATURES:
-               if (qc->tf.feature != SETFEATURES_WC_ON &&
-                               qc->tf.feature != SETFEATURES_WC_OFF)
-                       break;
-       case ATA_CMD_INIT_DEV_PARAMS:
-       case ATA_CMD_SET_MULTI:
-               break;
-
-       case ATA_CMD_SLEEP:
-               dev->flags |= ATA_DFLAG_SLEEPING;
-               break;
-       }
-
-       __ata_qc_complete(qc);
-}
-
-static void fill_result_tf(struct ata_queued_cmd *qc)
-{
-       struct ata_port *ap = qc->ap;
-
-       qc->result_tf.flags = qc->tf.flags;
-       ata_tf_read(ap, &qc->result_tf);
-}
-
-static void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
-{
-       struct ata_ioports *ioaddr = &ap->ioaddr;
-
-       tf->command = ata_check_status(ap);
-       tf->feature = readb(ioaddr->error_addr);
-       tf->nsect = readb(ioaddr->nsect_addr);
-       tf->lbal = readb(ioaddr->lbal_addr);
-       tf->lbam = readb(ioaddr->lbam_addr);
-       tf->lbah = readb(ioaddr->lbah_addr);
-       tf->device = readb(ioaddr->device_addr);
-
-       if (tf->flags & ATA_TFLAG_LBA48) {
-               if (ioaddr->ctl_addr) {
-                       writeb(tf->ctl | ATA_HOB, ioaddr->ctl_addr);
-
-                       tf->hob_feature = readb(ioaddr->error_addr);
-                       tf->hob_nsect = readb(ioaddr->nsect_addr);
-                       tf->hob_lbal = readb(ioaddr->lbal_addr);
-                       tf->hob_lbam = readb(ioaddr->lbam_addr);
-                       tf->hob_lbah = readb(ioaddr->lbah_addr);
-
-                       writeb(tf->ctl, ioaddr->ctl_addr);
-                       ap->last_ctl = tf->ctl;
-               } else {
-                       printf("sata_dwc warnning register read.\n");
-               }
-       }
-}
-
-static void __ata_qc_complete(struct ata_queued_cmd *qc)
-{
-       struct ata_port *ap = qc->ap;
-       struct ata_link *link = qc->dev->link;
-
-       link->active_tag = ATA_TAG_POISON;
-       ap->nr_active_links--;
-
-       if (qc->flags & ATA_QCFLAG_CLEAR_EXCL && ap->excl_link == link)
-               ap->excl_link = NULL;
-
-       qc->flags &= ~ATA_QCFLAG_ACTIVE;
-       ap->qc_active &= ~(1 << qc->tag);
-}
-
-static void ata_qc_free(struct ata_queued_cmd *qc)
-{
-       struct ata_port *ap = qc->ap;
-       unsigned int tag;
-       qc->flags = 0;
-       tag = qc->tag;
-       if (tag < ATA_MAX_QUEUE) {
-               qc->tag = ATA_TAG_POISON;
-               clear_bit(tag, &ap->qc_allocated);
-       }
-}
-
-static int check_sata_dev_state(void)
-{
-       unsigned long datalen;
-       unsigned char *pdata;
-       int ret = 0;
-       int i = 0;
-       char temp_data_buf[512];
-
-       while (1) {
-               udelay(10000);
-
-               pdata = (unsigned char*)&temp_data_buf[0];
-               datalen = 512;
-
-               ret = ata_dev_read_sectors(pdata, datalen, 0, 1);
-
-               if (ret == true)
-                       break;
-
-               i++;
-               if (i > (ATA_RESET_TIME * 100)) {
-                       printf("** TimeOUT **\n");
-                       dev_state = SATA_NODEVICE;
-                       return false;
-               }
-
-               if ((i >= 100) && ((i % 100) == 0))
-                       printf(".");
-       }
-
-       dev_state = SATA_READY;
-
-       return true;
-}
-
-static unsigned int ata_dev_set_feature(struct ata_device *dev,
-                               u8 enable, u8 feature)
-{
-       struct ata_taskfile tf;
-       struct ata_port *ap;
-       ap = pap;
-       unsigned int err_mask;
-
-       memset(&tf, 0, sizeof(tf));
-       tf.ctl = ap->ctl;
-
-       tf.device = ATA_DEVICE_OBS;
-       tf.command = ATA_CMD_SET_FEATURES;
-       tf.feature = enable;
-       tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
-       tf.protocol = ATA_PROT_NODATA;
-       tf.nsect = feature;
-
-       err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, 0, 0);
-
-       return err_mask;
-}
-
-static unsigned int ata_dev_init_params(struct ata_device *dev,
-                               u16 heads, u16 sectors)
-{
-       struct ata_taskfile tf;
-       struct ata_port *ap;
-       ap = pap;
-       unsigned int err_mask;
-
-       if (sectors < 1 || sectors > 255 || heads < 1 || heads > 16)
-               return AC_ERR_INVALID;
-
-       memset(&tf, 0, sizeof(tf));
-       tf.ctl = ap->ctl;
-       tf.device = ATA_DEVICE_OBS;
-       tf.command = ATA_CMD_INIT_DEV_PARAMS;
-       tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
-       tf.protocol = ATA_PROT_NODATA;
-       tf.nsect = sectors;
-       tf.device |= (heads - 1) & 0x0f;
-
-       err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, 0, 0);
-
-       if (err_mask == AC_ERR_DEV && (tf.feature & ATA_ABORTED))
-               err_mask = 0;
-
-       return err_mask;
-}
-
-#if defined(CONFIG_SATA_DWC) && !defined(CONFIG_LBA48)
-#define SATA_MAX_READ_BLK 0xFF
-#else
-#define SATA_MAX_READ_BLK 0xFFFF
-#endif
-
-ulong sata_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer)
-{
-       ulong start,blks, buf_addr;
-       unsigned short smallblks;
-       unsigned long datalen;
-       unsigned char *pdata;
-       device &= 0xff;
-
-       u32 block = 0;
-       u32 n_block = 0;
-
-       if (dev_state != SATA_READY)
-               return 0;
-
-       buf_addr = (unsigned long)buffer;
-       start = blknr;
-       blks = blkcnt;
-       do {
-               pdata = (unsigned char *)buf_addr;
-               if (blks > SATA_MAX_READ_BLK) {
-                       datalen = sata_dev_desc[device].blksz * SATA_MAX_READ_BLK;
-                       smallblks = SATA_MAX_READ_BLK;
-
-                       block = (u32)start;
-                       n_block = (u32)smallblks;
-
-                       start += SATA_MAX_READ_BLK;
-                       blks -= SATA_MAX_READ_BLK;
-               } else {
-                       datalen = sata_dev_desc[device].blksz * SATA_MAX_READ_BLK;
-                       datalen = sata_dev_desc[device].blksz * blks;
-                       smallblks = (unsigned short)blks;
-
-                       block = (u32)start;
-                       n_block = (u32)smallblks;
-
-                       start += blks;
-                       blks = 0;
-               }
-
-               if (ata_dev_read_sectors(pdata, datalen, block, n_block) != true) {
-                       printf("sata_dwc : Hard disk read error.\n");
-                       blkcnt -= blks;
-                       break;
-               }
-               buf_addr += datalen;
-       } while (blks != 0);
-
-       return (blkcnt);
-}
-
-static int ata_dev_read_sectors(unsigned char *pdata, unsigned long datalen,
-                                               u32 block, u32 n_block)
-{
-       struct ata_port *ap = pap;
-       struct ata_device *dev = &ata_device;
-       struct ata_taskfile tf;
-       unsigned int class = ATA_DEV_ATA;
-       unsigned int err_mask = 0;
-       const char *reason;
-       int may_fallback = 1;
-
-       if (dev_state == SATA_ERROR)
-               return false;
-
-       ata_dev_select(ap, dev->devno, 1, 1);
-
-retry:
-       memset(&tf, 0, sizeof(tf));
-       tf.ctl = ap->ctl;
-       ap->print_id = 1;
-       ap->flags &= ~ATA_FLAG_DISABLED;
-
-       ap->pdata = pdata;
-
-       tf.device = ATA_DEVICE_OBS;
-
-       temp_n_block = n_block;
-
-#ifdef CONFIG_LBA48
-       tf.command = ATA_CMD_PIO_READ_EXT;
-       tf.flags |= ATA_TFLAG_LBA | ATA_TFLAG_LBA48;
-
-       tf.hob_feature = 31;
-       tf.feature = 31;
-       tf.hob_nsect = (n_block >> 8) & 0xff;
-       tf.nsect = n_block & 0xff;
-
-       tf.hob_lbah = 0x0;
-       tf.hob_lbam = 0x0;
-       tf.hob_lbal = (block >> 24) & 0xff;
-       tf.lbah = (block >> 16) & 0xff;
-       tf.lbam = (block >> 8) & 0xff;
-       tf.lbal = block & 0xff;
-
-       tf.device = 1 << 6;
-       if (tf.flags & ATA_TFLAG_FUA)
-               tf.device |= 1 << 7;
-#else
-       tf.command = ATA_CMD_PIO_READ;
-       tf.flags |= ATA_TFLAG_LBA ;
-
-       tf.feature = 31;
-       tf.nsect = n_block & 0xff;
-
-       tf.lbah = (block >> 16) & 0xff;
-       tf.lbam = (block >> 8) & 0xff;
-       tf.lbal = block & 0xff;
-
-       tf.device = (block >> 24) & 0xf;
-
-       tf.device |= 1 << 6;
-       if (tf.flags & ATA_TFLAG_FUA)
-               tf.device |= 1 << 7;
-
-#endif
-
-       tf.protocol = ATA_PROT_PIO;
-
-       /* Some devices choke if TF registers contain garbage.  Make
-        * sure those are properly initialized.
-        */
-       tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
-       tf.flags |= ATA_TFLAG_POLLING;
-
-       err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE, 0, 0);
-
-       if (err_mask) {
-               if (err_mask & AC_ERR_NODEV_HINT) {
-                       printf("READ_SECTORS NODEV after polling detection\n");
-                       return -ENOENT;
-               }
-
-               if ((err_mask == AC_ERR_DEV) && (tf.feature & ATA_ABORTED)) {
-                       /* Device or controller might have reported
-                        * the wrong device class.  Give a shot at the
-                        * other IDENTIFY if the current one is
-                        * aborted by the device.
-                        */
-                       if (may_fallback) {
-                               may_fallback = 0;
-
-                               if (class == ATA_DEV_ATA) {
-                                       class = ATA_DEV_ATAPI;
-                               } else {
-                                       class = ATA_DEV_ATA;
-                               }
-                               goto retry;
-                       }
-                       /* Control reaches here iff the device aborted
-                        * both flavors of IDENTIFYs which happens
-                        * sometimes with phantom devices.
-                        */
-                       printf("both IDENTIFYs aborted, assuming NODEV\n");
-                       return -ENOENT;
-               }
-
-               reason = "I/O error";
-               goto err_out;
-       }
-
-       return true;
-
-err_out:
-       printf("failed to READ SECTORS (%s, err_mask=0x%x)\n", reason, err_mask);
-       return false;
-}
-
-#if defined(CONFIG_SATA_DWC) && !defined(CONFIG_LBA48)
-#define SATA_MAX_WRITE_BLK 0xFF
-#else
-#define SATA_MAX_WRITE_BLK 0xFFFF
-#endif
-
-ulong sata_write(int device, ulong blknr, lbaint_t blkcnt, const void *buffer)
-{
-       ulong start,blks, buf_addr;
-       unsigned short smallblks;
-       unsigned long datalen;
-       unsigned char *pdata;
-       device &= 0xff;
-
-
-       u32 block = 0;
-       u32 n_block = 0;
-
-       if (dev_state != SATA_READY)
-               return 0;
-
-       buf_addr = (unsigned long)buffer;
-       start = blknr;
-       blks = blkcnt;
-       do {
-               pdata = (unsigned char *)buf_addr;
-               if (blks > SATA_MAX_WRITE_BLK) {
-                       datalen = sata_dev_desc[device].blksz * SATA_MAX_WRITE_BLK;
-                       smallblks = SATA_MAX_WRITE_BLK;
-
-                       block = (u32)start;
-                       n_block = (u32)smallblks;
-
-                       start += SATA_MAX_WRITE_BLK;
-                       blks -= SATA_MAX_WRITE_BLK;
-               } else {
-                       datalen = sata_dev_desc[device].blksz * blks;
-                       smallblks = (unsigned short)blks;
-
-                       block = (u32)start;
-                       n_block = (u32)smallblks;
-
-                       start += blks;
-                       blks = 0;
-               }
-
-               if (ata_dev_write_sectors(pdata, datalen, block, n_block) != true) {
-                       printf("sata_dwc : Hard disk read error.\n");
-                       blkcnt -= blks;
-                       break;
-               }
-               buf_addr += datalen;
-       } while (blks != 0);
-
-       return (blkcnt);
-}
-
-static int ata_dev_write_sectors(unsigned char* pdata, unsigned long datalen,
-                                               u32 block, u32 n_block)
-{
-       struct ata_port *ap = pap;
-       struct ata_device *dev = &ata_device;
-       struct ata_taskfile tf;
-       unsigned int class = ATA_DEV_ATA;
-       unsigned int err_mask = 0;
-       const char *reason;
-       int may_fallback = 1;
-
-       if (dev_state == SATA_ERROR)
-               return false;
-
-       ata_dev_select(ap, dev->devno, 1, 1);
-
-retry:
-       memset(&tf, 0, sizeof(tf));
-       tf.ctl = ap->ctl;
-       ap->print_id = 1;
-       ap->flags &= ~ATA_FLAG_DISABLED;
-
-       ap->pdata = pdata;
-
-       tf.device = ATA_DEVICE_OBS;
-
-       temp_n_block = n_block;
-
-
-#ifdef CONFIG_LBA48
-       tf.command = ATA_CMD_PIO_WRITE_EXT;
-       tf.flags |= ATA_TFLAG_LBA | ATA_TFLAG_LBA48 | ATA_TFLAG_WRITE;
-
-       tf.hob_feature = 31;
-       tf.feature = 31;
-       tf.hob_nsect = (n_block >> 8) & 0xff;
-       tf.nsect = n_block & 0xff;
-
-       tf.hob_lbah = 0x0;
-       tf.hob_lbam = 0x0;
-       tf.hob_lbal = (block >> 24) & 0xff;
-       tf.lbah = (block >> 16) & 0xff;
-       tf.lbam = (block >> 8) & 0xff;
-       tf.lbal = block & 0xff;
-
-       tf.device = 1 << 6;
-       if (tf.flags & ATA_TFLAG_FUA)
-               tf.device |= 1 << 7;
-#else
-       tf.command = ATA_CMD_PIO_WRITE;
-       tf.flags |= ATA_TFLAG_LBA | ATA_TFLAG_WRITE;
-
-       tf.feature = 31;
-       tf.nsect = n_block & 0xff;
-
-       tf.lbah = (block >> 16) & 0xff;
-       tf.lbam = (block >> 8) & 0xff;
-       tf.lbal = block & 0xff;
-
-       tf.device = (block >> 24) & 0xf;
-
-       tf.device |= 1 << 6;
-       if (tf.flags & ATA_TFLAG_FUA)
-               tf.device |= 1 << 7;
-
-#endif
-
-       tf.protocol = ATA_PROT_PIO;
-
-       /* Some devices choke if TF registers contain garbage.  Make
-        * sure those are properly initialized.
-        */
-       tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
-       tf.flags |= ATA_TFLAG_POLLING;
-
-       err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE, 0, 0);
-
-       if (err_mask) {
-               if (err_mask & AC_ERR_NODEV_HINT) {
-                       printf("READ_SECTORS NODEV after polling detection\n");
-                       return -ENOENT;
-               }
-
-               if ((err_mask == AC_ERR_DEV) && (tf.feature & ATA_ABORTED)) {
-                       /* Device or controller might have reported
-                        * the wrong device class.  Give a shot at the
-                        * other IDENTIFY if the current one is
-                        * aborted by the device.
-                        */
-                       if (may_fallback) {
-                               may_fallback = 0;
-
-                               if (class == ATA_DEV_ATA) {
-                                       class = ATA_DEV_ATAPI;
-                               } else {
-                                       class = ATA_DEV_ATA;
-                               }
-                               goto retry;
-                       }
-                       /* Control reaches here iff the device aborted
-                        * both flavors of IDENTIFYs which happens
-                        * sometimes with phantom devices.
-                        */
-                       printf("both IDENTIFYs aborted, assuming NODEV\n");
-                       return -ENOENT;
-               }
-
-               reason = "I/O error";
-               goto err_out;
-       }
-
-       return true;
-
-err_out:
-       printf("failed to WRITE SECTORS (%s, err_mask=0x%x)\n", reason, err_mask);
-       return false;
-}
diff --git a/drivers/ata/sata_dwc.h b/drivers/ata/sata_dwc.h
deleted file mode 100644 (file)
index 17fb20c..0000000
+++ /dev/null
@@ -1,458 +0,0 @@
-/*
- * sata_dwc.h
- *
- * Synopsys DesignWare Cores (DWC) SATA host driver
- *
- * Author: Mark Miesfeld <mmiesfeld@amcc.com>
- *
- * Ported from 2.6.19.2 to 2.6.25/26 by Stefan Roese <sr@denx.de>
- * Copyright 2008 DENX Software Engineering
- *
- * Based on versions provided by AMCC and Synopsys which are:
- *          Copyright 2006 Applied Micro Circuits Corporation
- *          COPYRIGHT (C) 2005  SYNOPSYS, INC.  ALL RIGHTS RESERVED
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-/*
- * SATA support based on the chip canyonlands.
- *
- * 04-17-2009
- *             The local version of this driver for the canyonlands board
- *             does not use interrupts but polls the chip instead.
- */
-
-
-#ifndef _SATA_DWC_H_
-#define _SATA_DWC_H_
-
-#define __U_BOOT__
-
-#define HZ 100
-#define READ 0
-#define WRITE 1
-
-enum {
-       ATA_READID_POSTRESET    = (1 << 0),
-
-       ATA_DNXFER_PIO          = 0,
-       ATA_DNXFER_DMA          = 1,
-       ATA_DNXFER_40C          = 2,
-       ATA_DNXFER_FORCE_PIO    = 3,
-       ATA_DNXFER_FORCE_PIO0   = 4,
-
-       ATA_DNXFER_QUIET        = (1 << 31),
-};
-
-enum hsm_task_states {
-       HSM_ST_IDLE,
-       HSM_ST_FIRST,
-       HSM_ST,
-       HSM_ST_LAST,
-       HSM_ST_ERR,
-};
-
-#define        ATA_SHORT_PAUSE         ((HZ >> 6) + 1)
-
-struct ata_queued_cmd {
-       struct ata_port         *ap;
-       struct ata_device       *dev;
-
-       struct ata_taskfile     tf;
-       u8                      cdb[ATAPI_CDB_LEN];
-       unsigned long           flags;
-       unsigned int            tag;
-       unsigned int            n_elem;
-
-       int                     dma_dir;
-       unsigned int            sect_size;
-
-       unsigned int            nbytes;
-       unsigned int            extrabytes;
-       unsigned int            curbytes;
-
-       unsigned int            err_mask;
-       struct ata_taskfile     result_tf;
-
-       void                    *private_data;
-#ifndef __U_BOOT__
-       void                    *lldd_task;
-#endif
-       unsigned char           *pdata;
-};
-
-typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
-
-#define ATA_TAG_POISON 0xfafbfcfdU
-
-enum {
-       LIBATA_MAX_PRD          = ATA_MAX_PRD / 2,
-       LIBATA_DUMB_MAX_PRD     = ATA_MAX_PRD / 4,
-       ATA_MAX_PORTS           = 8,
-       ATA_DEF_QUEUE           = 1,
-       ATA_MAX_QUEUE           = 32,
-       ATA_TAG_INTERNAL        = ATA_MAX_QUEUE - 1,
-       ATA_MAX_BUS             = 2,
-       ATA_DEF_BUSY_WAIT       = 10000,
-
-       ATAPI_MAX_DRAIN         = 16 << 10,
-
-       ATA_SHT_EMULATED        = 1,
-       ATA_SHT_CMD_PER_LUN     = 1,
-       ATA_SHT_THIS_ID         = -1,
-       ATA_SHT_USE_CLUSTERING  = 1,
-
-       ATA_DFLAG_LBA           = (1 << 0),
-       ATA_DFLAG_LBA48         = (1 << 1),
-       ATA_DFLAG_CDB_INTR      = (1 << 2),
-       ATA_DFLAG_NCQ           = (1 << 3),
-       ATA_DFLAG_FLUSH_EXT     = (1 << 4),
-       ATA_DFLAG_ACPI_PENDING  = (1 << 5),
-       ATA_DFLAG_ACPI_FAILED   = (1 << 6),
-       ATA_DFLAG_AN            = (1 << 7),
-       ATA_DFLAG_HIPM          = (1 << 8),
-       ATA_DFLAG_DIPM          = (1 << 9),
-       ATA_DFLAG_DMADIR        = (1 << 10),
-       ATA_DFLAG_CFG_MASK      = (1 << 12) - 1,
-
-       ATA_DFLAG_PIO           = (1 << 12),
-       ATA_DFLAG_NCQ_OFF       = (1 << 13),
-       ATA_DFLAG_SPUNDOWN      = (1 << 14),
-       ATA_DFLAG_SLEEPING      = (1 << 15),
-       ATA_DFLAG_DUBIOUS_XFER  = (1 << 16),
-       ATA_DFLAG_INIT_MASK     = (1 << 24) - 1,
-
-       ATA_DFLAG_DETACH        = (1 << 24),
-       ATA_DFLAG_DETACHED      = (1 << 25),
-
-       ATA_LFLAG_HRST_TO_RESUME        = (1 << 0),
-       ATA_LFLAG_SKIP_D2H_BSY          = (1 << 1),
-       ATA_LFLAG_NO_SRST               = (1 << 2),
-       ATA_LFLAG_ASSUME_ATA            = (1 << 3),
-       ATA_LFLAG_ASSUME_SEMB           = (1 << 4),
-       ATA_LFLAG_ASSUME_CLASS = ATA_LFLAG_ASSUME_ATA | ATA_LFLAG_ASSUME_SEMB,
-       ATA_LFLAG_NO_RETRY              = (1 << 5),
-       ATA_LFLAG_DISABLED              = (1 << 6),
-
-       ATA_FLAG_SLAVE_POSS     = (1 << 0),
-       ATA_FLAG_SATA           = (1 << 1),
-       ATA_FLAG_NO_LEGACY      = (1 << 2),
-       ATA_FLAG_MMIO           = (1 << 3),
-       ATA_FLAG_SRST           = (1 << 4),
-       ATA_FLAG_SATA_RESET     = (1 << 5),
-       ATA_FLAG_NO_ATAPI       = (1 << 6),
-       ATA_FLAG_PIO_DMA        = (1 << 7),
-       ATA_FLAG_PIO_LBA48      = (1 << 8),
-       ATA_FLAG_PIO_POLLING    = (1 << 9),
-       ATA_FLAG_NCQ            = (1 << 10),
-       ATA_FLAG_DEBUGMSG       = (1 << 13),
-       ATA_FLAG_IGN_SIMPLEX    = (1 << 15),
-       ATA_FLAG_NO_IORDY       = (1 << 16),
-       ATA_FLAG_ACPI_SATA      = (1 << 17),
-       ATA_FLAG_AN             = (1 << 18),
-       ATA_FLAG_PMP            = (1 << 19),
-       ATA_FLAG_IPM            = (1 << 20),
-
-       ATA_FLAG_DISABLED       = (1 << 23),
-
-       ATA_PFLAG_EH_PENDING            = (1 << 0),
-       ATA_PFLAG_EH_IN_PROGRESS        = (1 << 1),
-       ATA_PFLAG_FROZEN                = (1 << 2),
-       ATA_PFLAG_RECOVERED             = (1 << 3),
-       ATA_PFLAG_LOADING               = (1 << 4),
-       ATA_PFLAG_UNLOADING             = (1 << 5),
-       ATA_PFLAG_SCSI_HOTPLUG          = (1 << 6),
-       ATA_PFLAG_INITIALIZING          = (1 << 7),
-       ATA_PFLAG_RESETTING             = (1 << 8),
-       ATA_PFLAG_SUSPENDED             = (1 << 17),
-       ATA_PFLAG_PM_PENDING            = (1 << 18),
-
-       ATA_QCFLAG_ACTIVE       = (1 << 0),
-       ATA_QCFLAG_DMAMAP       = (1 << 1),
-       ATA_QCFLAG_IO           = (1 << 3),
-       ATA_QCFLAG_RESULT_TF    = (1 << 4),
-       ATA_QCFLAG_CLEAR_EXCL   = (1 << 5),
-       ATA_QCFLAG_QUIET        = (1 << 6),
-
-       ATA_QCFLAG_FAILED       = (1 << 16),
-       ATA_QCFLAG_SENSE_VALID  = (1 << 17),
-       ATA_QCFLAG_EH_SCHEDULED = (1 << 18),
-
-       ATA_HOST_SIMPLEX        = (1 << 0),
-       ATA_HOST_STARTED        = (1 << 1),
-
-       ATA_TMOUT_BOOT                  = 30 * 100,
-       ATA_TMOUT_BOOT_QUICK            = 7 * 100,
-       ATA_TMOUT_INTERNAL              = 30 * 100,
-       ATA_TMOUT_INTERNAL_QUICK        = 5 * 100,
-
-       /* FIXME: GoVault needs 2s but we can't afford that without
-        * parallel probing.  800ms is enough for iVDR disk
-        * HHD424020F7SV00.  Increase to 2secs when parallel probing
-        * is in place.
-        */
-       ATA_TMOUT_FF_WAIT       = 4 * 100 / 5,
-
-       BUS_UNKNOWN             = 0,
-       BUS_DMA                 = 1,
-       BUS_IDLE                = 2,
-       BUS_NOINTR              = 3,
-       BUS_NODATA              = 4,
-       BUS_TIMER               = 5,
-       BUS_PIO                 = 6,
-       BUS_EDD                 = 7,
-       BUS_IDENTIFY            = 8,
-       BUS_PACKET              = 9,
-
-       PORT_UNKNOWN            = 0,
-       PORT_ENABLED            = 1,
-       PORT_DISABLED           = 2,
-
-       /* encoding various smaller bitmaps into a single
-        * unsigned long bitmap
-        */
-       ATA_NR_PIO_MODES        = 7,
-       ATA_NR_MWDMA_MODES      = 5,
-       ATA_NR_UDMA_MODES       = 8,
-
-       ATA_SHIFT_PIO           = 0,
-       ATA_SHIFT_MWDMA         = ATA_SHIFT_PIO + ATA_NR_PIO_MODES,
-       ATA_SHIFT_UDMA          = ATA_SHIFT_MWDMA + ATA_NR_MWDMA_MODES,
-
-       ATA_DMA_PAD_SZ          = 4,
-
-       ATA_ERING_SIZE          = 32,
-
-       ATA_DEFER_LINK          = 1,
-       ATA_DEFER_PORT          = 2,
-
-       ATA_EH_DESC_LEN         = 80,
-
-       ATA_EH_REVALIDATE       = (1 << 0),
-       ATA_EH_SOFTRESET        = (1 << 1),
-       ATA_EH_HARDRESET        = (1 << 2),
-       ATA_EH_ENABLE_LINK      = (1 << 3),
-       ATA_EH_LPM              = (1 << 4),
-
-       ATA_EH_RESET_MASK       = ATA_EH_SOFTRESET | ATA_EH_HARDRESET,
-       ATA_EH_PERDEV_MASK      = ATA_EH_REVALIDATE,
-
-       ATA_EHI_HOTPLUGGED      = (1 << 0),
-       ATA_EHI_RESUME_LINK     = (1 << 1),
-       ATA_EHI_NO_AUTOPSY      = (1 << 2),
-       ATA_EHI_QUIET           = (1 << 3),
-
-       ATA_EHI_DID_SOFTRESET   = (1 << 16),
-       ATA_EHI_DID_HARDRESET   = (1 << 17),
-       ATA_EHI_PRINTINFO       = (1 << 18),
-       ATA_EHI_SETMODE         = (1 << 19),
-       ATA_EHI_POST_SETMODE    = (1 << 20),
-
-       ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET,
-       ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK,
-
-       ATA_EH_MAX_TRIES        = 5,
-
-       ATA_PROBE_MAX_TRIES     = 3,
-       ATA_EH_DEV_TRIES        = 3,
-       ATA_EH_PMP_TRIES        = 5,
-       ATA_EH_PMP_LINK_TRIES   = 3,
-
-       SATA_PMP_SCR_TIMEOUT    = 250,
-
-       /* Horkage types. May be set by libata or controller on drives
-       (some horkage may be drive/controller pair dependant */
-
-       ATA_HORKAGE_DIAGNOSTIC  = (1 << 0),
-       ATA_HORKAGE_NODMA       = (1 << 1),
-       ATA_HORKAGE_NONCQ       = (1 << 2),
-       ATA_HORKAGE_MAX_SEC_128 = (1 << 3),
-       ATA_HORKAGE_BROKEN_HPA  = (1 << 4),
-       ATA_HORKAGE_SKIP_PM     = (1 << 5),
-       ATA_HORKAGE_HPA_SIZE    = (1 << 6),
-       ATA_HORKAGE_IPM         = (1 << 7),
-       ATA_HORKAGE_IVB         = (1 << 8),
-       ATA_HORKAGE_STUCK_ERR   = (1 << 9),
-
-       ATA_DMA_MASK_ATA        = (1 << 0),
-       ATA_DMA_MASK_ATAPI      = (1 << 1),
-       ATA_DMA_MASK_CFA        = (1 << 2),
-
-       ATAPI_READ              = 0,
-       ATAPI_WRITE             = 1,
-       ATAPI_READ_CD           = 2,
-       ATAPI_PASS_THRU         = 3,
-       ATAPI_MISC              = 4,
-};
-
-enum ata_completion_errors {
-       AC_ERR_DEV              = (1 << 0),
-       AC_ERR_HSM              = (1 << 1),
-       AC_ERR_TIMEOUT          = (1 << 2),
-       AC_ERR_MEDIA            = (1 << 3),
-       AC_ERR_ATA_BUS          = (1 << 4),
-       AC_ERR_HOST_BUS         = (1 << 5),
-       AC_ERR_SYSTEM           = (1 << 6),
-       AC_ERR_INVALID          = (1 << 7),
-       AC_ERR_OTHER            = (1 << 8),
-       AC_ERR_NODEV_HINT       = (1 << 9),
-       AC_ERR_NCQ              = (1 << 10),
-};
-
-enum ata_xfer_mask {
-       ATA_MASK_PIO    = ((1LU << ATA_NR_PIO_MODES) - 1) << ATA_SHIFT_PIO,
-       ATA_MASK_MWDMA  = ((1LU << ATA_NR_MWDMA_MODES) - 1) << ATA_SHIFT_MWDMA,
-       ATA_MASK_UDMA   = ((1LU << ATA_NR_UDMA_MODES) - 1) << ATA_SHIFT_UDMA,
-};
-
-struct ata_port_info {
-#ifndef __U_BOOT__
-       struct scsi_host_template       *sht;
-#endif
-       unsigned long                   flags;
-       unsigned long                   link_flags;
-       unsigned long                   pio_mask;
-       unsigned long                   mwdma_mask;
-       unsigned long                   udma_mask;
-#ifndef __U_BOOT__
-       const struct ata_port_operations *port_ops;
-       void                            *private_data;
-#endif
-};
-
-struct ata_ioports {
-       void __iomem            *cmd_addr;
-       void __iomem            *data_addr;
-       void __iomem            *error_addr;
-       void __iomem            *feature_addr;
-       void __iomem            *nsect_addr;
-       void __iomem            *lbal_addr;
-       void __iomem            *lbam_addr;
-       void __iomem            *lbah_addr;
-       void __iomem            *device_addr;
-       void __iomem            *status_addr;
-       void __iomem            *command_addr;
-       void __iomem            *altstatus_addr;
-       void __iomem            *ctl_addr;
-#ifndef __U_BOOT__
-       void __iomem            *bmdma_addr;
-#endif
-       void __iomem            *scr_addr;
-};
-
-struct ata_host {
-#ifndef __U_BOOT__
-       void __iomem * const    *iomap;
-       void                    *private_data;
-       const struct ata_port_operations *ops;
-       unsigned long           flags;
-       struct ata_port         *simplex_claimed;
-#endif
-       unsigned int            n_ports;
-       struct ata_port         *ports[0];
-};
-
-#ifndef __U_BOOT__
-struct ata_port_stats {
-       unsigned long           unhandled_irq;
-       unsigned long           idle_irq;
-       unsigned long           rw_reqbuf;
-};
-#endif
-
-struct ata_device {
-       struct ata_link         *link;
-       unsigned int            devno;
-       unsigned long           flags;
-       unsigned int            horkage;
-#ifndef __U_BOOT__
-       struct scsi_device      *sdev;
-#ifdef CONFIG_ATA_ACPI
-       acpi_handle             acpi_handle;
-       union acpi_object       *gtf_cache;
-#endif
-#endif
-       u64                     n_sectors;
-       unsigned int            class;
-
-       union {
-               u16             id[ATA_ID_WORDS];
-               u32             gscr[SATA_PMP_GSCR_DWORDS];
-       };
-#ifndef __U_BOOT__
-       u8                      pio_mode;
-       u8                      dma_mode;
-       u8                      xfer_mode;
-       unsigned int            xfer_shift;
-#endif
-       unsigned int            multi_count;
-       unsigned int            max_sectors;
-       unsigned int            cdb_len;
-#ifndef __U_BOOT__
-       unsigned long           pio_mask;
-       unsigned long           mwdma_mask;
-#endif
-       unsigned long           udma_mask;
-       u16                     cylinders;
-       u16                     heads;
-       u16                     sectors;
-#ifndef __U_BOOT__
-       int                     spdn_cnt;
-#endif
-};
-
-struct ata_link {
-       struct ata_port         *ap;
-       int                     pmp;
-       unsigned int            active_tag;
-       u32                     sactive;
-       unsigned int            flags;
-       unsigned int            hw_sata_spd_limit;
-#ifndef __U_BOOT__
-       unsigned int            sata_spd_limit;
-       unsigned int            sata_spd;
-       struct ata_device       device[2];
-#endif
-};
-
-struct ata_port {
-       unsigned long           flags;
-       unsigned int            pflags;
-       unsigned int            print_id;
-       unsigned int            port_no;
-
-       struct ata_ioports      ioaddr;
-
-       u8                      ctl;
-       u8                      last_ctl;
-       unsigned int            pio_mask;
-       unsigned int            mwdma_mask;
-       unsigned int            udma_mask;
-       unsigned int            cbl;
-
-       struct ata_queued_cmd   qcmd[ATA_MAX_QUEUE];
-       unsigned long           qc_allocated;
-       unsigned int            qc_active;
-       int                     nr_active_links;
-
-       struct ata_link         link;
-#ifndef __U_BOOT__
-       int                     nr_pmp_links;
-       struct ata_link         *pmp_link;
-#endif
-       struct ata_link         *excl_link;
-       int                     nr_pmp_links;
-#ifndef __U_BOOT__
-       struct ata_port_stats   stats;
-       struct device           *dev;
-       u32                     msg_enable;
-#endif
-       struct ata_host         *host;
-       void                    *port_task_data;
-
-       unsigned int            hsm_task_state;
-       void                    *private_data;
-       unsigned char           *pdata;
-};
-
-#endif
index f6644ee6d16f881be63a6f9661f15a25152942e0..cdfa052c16a9717a97134ecd927b71a20a7ba177 100644 (file)
@@ -54,6 +54,12 @@ config CLK_STM32F
          This clock driver adds support for RCC clock management
          for STM32F4 and STM32F7 SoCs.
 
+config CLK_HSDK
+       bool "Enable cgu clock driver for HSDK"
+       depends on CLK
+       help
+         Enable this to support the cgu clocks on Synopsys ARC HSDK
+
 config CLK_ZYNQ
        bool "Enable clock driver support for Zynq"
        depends on CLK && ARCH_ZYNQ
index bcc8f82fb65db2c3e12df6331a2810876971b13d..876c2b816f193ca7e0aa5935bda67cb8f6017395 100644 (file)
@@ -20,6 +20,7 @@ obj-$(CONFIG_CLK_EXYNOS) += exynos/
 obj-$(CONFIG_CLK_AT91) += at91/
 obj-$(CONFIG_CLK_BCM6345) += clk_bcm6345.o
 obj-$(CONFIG_CLK_BOSTON) += clk_boston.o
+obj-$(CONFIG_CLK_HSDK) += clk-hsdk-cgu.o
 obj-$(CONFIG_ARCH_ASPEED) += aspeed/
 obj-$(CONFIG_CLK_STM32F) += clk_stm32f.o
 obj-$(CONFIG_STM32H7) += clk_stm32h7.o
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
new file mode 100644 (file)
index 0000000..c80f90e
--- /dev/null
@@ -0,0 +1,564 @@
+/*
+ * Synopsys HSDK SDP CGU clock driver
+ *
+ * Copyright (C) 2017 Synopsys
+ * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+ *
+ * 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 <common.h>
+#include <clk-uclass.h>
+#include <div64.h>
+#include <dm.h>
+#include <linux/io.h>
+
+/*
+ * Synopsys ARC HSDK clock tree.
+ *
+ *   ------------------
+ *   | 33.33 MHz xtal |
+ *   ------------------
+ *            |
+ *            |   -----------
+ *            |-->| ARC PLL |
+ *            |   -----------
+ *            |        |
+ *            |        |-->|CGU_ARC_IDIV|----------->
+ *            |        |-->|CREG_CORE_IF_DIV|------->
+ *            |
+ *            |   --------------
+ *            |-->| SYSTEM PLL |
+ *            |   --------------
+ *            |        |
+ *            |        |-->|CGU_SYS_IDIV_APB|------->
+ *            |        |-->|CGU_SYS_IDIV_AXI|------->
+ *            |        |-->|CGU_SYS_IDIV_*|--------->
+ *            |        |-->|CGU_SYS_IDIV_EBI_REF|--->
+ *            |
+ *            |   --------------
+ *            |-->| TUNNEL PLL |
+ *            |   --------------
+ *            |        |
+ *            |        |-->|CGU_TUN_IDIV|----------->
+ *            |
+ *            |   ------------
+ *            |-->| HDMI PLL |
+ *            |   ------------
+ *            |        |
+ *            |        |-->|CGU_HDMI_IDIV_APB|------>
+ *            |
+ *            |   -----------
+ *            |-->| DDR PLL |
+ *                -----------
+ *                     |
+ *                     |---------------------------->
+ */
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define CGU_ARC_IDIV           0x080
+#define CGU_TUN_IDIV           0x380
+#define CGU_HDMI_IDIV_APB      0x480
+#define CGU_SYS_IDIV_APB       0x180
+#define CGU_SYS_IDIV_AXI       0x190
+#define CGU_SYS_IDIV_ETH       0x1A0
+#define CGU_SYS_IDIV_USB       0x1B0
+#define CGU_SYS_IDIV_SDIO      0x1C0
+#define CGU_SYS_IDIV_HDMI      0x1D0
+#define CGU_SYS_IDIV_GFX_CORE  0x1E0
+#define CGU_SYS_IDIV_GFX_DMA   0x1F0
+#define CGU_SYS_IDIV_GFX_CFG   0x200
+#define CGU_SYS_IDIV_DMAC_CORE 0x210
+#define CGU_SYS_IDIV_DMAC_CFG  0x220
+#define CGU_SYS_IDIV_SDIO_REF  0x230
+#define CGU_SYS_IDIV_SPI_REF   0x240
+#define CGU_SYS_IDIV_I2C_REF   0x250
+#define CGU_SYS_IDIV_UART_REF  0x260
+#define CGU_SYS_IDIV_EBI_REF   0x270
+
+#define CGU_IDIV_MASK          0xFF /* All idiv have 8 significant bits */
+
+#define CGU_ARC_PLL            0x0
+#define CGU_SYS_PLL            0x10
+#define CGU_DDR_PLL            0x20
+#define CGU_TUN_PLL            0x30
+#define CGU_HDMI_PLL           0x40
+
+#define CGU_PLL_CTRL           0x000 /* ARC PLL control register */
+#define CGU_PLL_STATUS         0x004 /* ARC PLL status register */
+#define CGU_PLL_FMEAS          0x008 /* ARC PLL frequency measurement register */
+#define CGU_PLL_MON            0x00C /* ARC PLL monitor register */
+
+#define CGU_PLL_CTRL_ODIV_SHIFT                2
+#define CGU_PLL_CTRL_IDIV_SHIFT                4
+#define CGU_PLL_CTRL_FBDIV_SHIFT       9
+#define CGU_PLL_CTRL_BAND_SHIFT                20
+
+#define CGU_PLL_CTRL_ODIV_MASK         GENMASK(3, CGU_PLL_CTRL_ODIV_SHIFT)
+#define CGU_PLL_CTRL_IDIV_MASK         GENMASK(8, CGU_PLL_CTRL_IDIV_SHIFT)
+#define CGU_PLL_CTRL_FBDIV_MASK                GENMASK(15, CGU_PLL_CTRL_FBDIV_SHIFT)
+
+#define CGU_PLL_CTRL_PD                        BIT(0)
+#define CGU_PLL_CTRL_BYPASS            BIT(1)
+
+#define CGU_PLL_STATUS_LOCK            BIT(0)
+#define CGU_PLL_STATUS_ERR             BIT(1)
+
+#define HSDK_PLL_MAX_LOCK_TIME         100 /* 100 us */
+
+#define CREG_CORE_IF_DIV               0x000 /* ARC CORE interface divider */
+#define CORE_IF_CLK_THRESHOLD_HZ       500000000
+#define CREG_CORE_IF_CLK_DIV_1         0x0
+#define CREG_CORE_IF_CLK_DIV_2         0x1
+
+#define PARENT_RATE                    33333333 /* fixed clock - xtal */
+#define CGU_MAX_CLOCKS                 24
+
+struct hsdk_pll_cfg {
+       u32 rate;
+       u32 idiv;
+       u32 fbdiv;
+       u32 odiv;
+       u32 band;
+};
+
+static const struct hsdk_pll_cfg asdt_pll_cfg[] = {
+       { 100000000,  0, 11, 3, 0 },
+       { 125000000,  0, 14, 3, 0 },
+       { 133000000,  0, 15, 3, 0 },
+       { 150000000,  0, 17, 3, 0 },
+       { 200000000,  1, 47, 3, 0 },
+       { 233000000,  1, 27, 2, 0 },
+       { 300000000,  1, 35, 2, 0 },
+       { 333000000,  1, 39, 2, 0 },
+       { 400000000,  1, 47, 2, 0 },
+       { 500000000,  0, 14, 1, 0 },
+       { 600000000,  0, 17, 1, 0 },
+       { 700000000,  0, 20, 1, 0 },
+       { 800000000,  0, 23, 1, 0 },
+       { 900000000,  1, 26, 0, 0 },
+       { 1000000000, 1, 29, 0, 0 },
+       { 1100000000, 1, 32, 0, 0 },
+       { 1200000000, 1, 35, 0, 0 },
+       { 1300000000, 1, 38, 0, 0 },
+       { 1400000000, 1, 41, 0, 0 },
+       { 1500000000, 1, 44, 0, 0 },
+       { 1600000000, 1, 47, 0, 0 },
+       {}
+};
+
+static const struct hsdk_pll_cfg hdmi_pll_cfg[] = {
+       { 297000000,  0, 21, 2, 0 },
+       { 540000000,  0, 19, 1, 0 },
+       { 594000000,  0, 21, 1, 0 },
+       {}
+};
+
+struct hsdk_cgu_clk {
+       /* CGU block register */
+       void __iomem *cgu_regs;
+       /* CREG block register */
+       void __iomem *creg_regs;
+
+       /* PLLs registers */
+       void __iomem *regs;
+       /* PLLs special registers */
+       void __iomem *spec_regs;
+       /* PLLs devdata */
+       const struct hsdk_pll_devdata *pll_devdata;
+
+       /* Dividers registers */
+       void __iomem *idiv_regs;
+};
+
+struct hsdk_pll_devdata {
+       const struct hsdk_pll_cfg *pll_cfg;
+       int (*update_rate)(struct hsdk_cgu_clk *clk, unsigned long rate,
+                          const struct hsdk_pll_cfg *cfg);
+};
+
+static int hsdk_pll_core_update_rate(struct hsdk_cgu_clk *, unsigned long,
+                                    const struct hsdk_pll_cfg *);
+static int hsdk_pll_comm_update_rate(struct hsdk_cgu_clk *, unsigned long,
+                                    const struct hsdk_pll_cfg *);
+
+static const struct hsdk_pll_devdata core_pll_dat = {
+       .pll_cfg = asdt_pll_cfg,
+       .update_rate = hsdk_pll_core_update_rate,
+};
+
+static const struct hsdk_pll_devdata sdt_pll_dat = {
+       .pll_cfg = asdt_pll_cfg,
+       .update_rate = hsdk_pll_comm_update_rate,
+};
+
+static const struct hsdk_pll_devdata hdmi_pll_dat = {
+       .pll_cfg = hdmi_pll_cfg,
+       .update_rate = hsdk_pll_comm_update_rate,
+};
+
+static ulong idiv_set(struct clk *, ulong);
+static ulong idiv_get(struct clk *);
+static int idiv_off(struct clk *);
+static ulong pll_set(struct clk *, ulong);
+static ulong pll_get(struct clk *);
+
+struct hsdk_cgu_clock_map {
+       u32 cgu_pll_oft;
+       u32 creg_div_oft;
+       u32 cgu_div_oft;
+       const struct hsdk_pll_devdata *pll_devdata;
+       ulong (*get_rate)(struct clk *clk);
+       ulong (*set_rate)(struct clk *clk, ulong rate);
+       int (*disable)(struct clk *clk);
+};
+
+static const struct hsdk_cgu_clock_map clock_map[] = {
+       { CGU_ARC_PLL, 0, 0, &core_pll_dat, pll_get, pll_set, NULL },
+       { CGU_ARC_PLL, 0, CGU_ARC_IDIV, &core_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_DDR_PLL, 0, 0, &sdt_pll_dat, pll_get, pll_set, NULL },
+       { CGU_SYS_PLL, 0, 0, &sdt_pll_dat, pll_get, pll_set, NULL },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_APB, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_AXI, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_ETH, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_USB, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_SDIO, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_HDMI, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_GFX_CORE, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_GFX_DMA, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_GFX_CFG, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_DMAC_CORE, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_DMAC_CFG, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_SDIO_REF, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_SPI_REF, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_I2C_REF, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_UART_REF, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_SYS_PLL, 0, CGU_SYS_IDIV_EBI_REF, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_TUN_PLL, 0, 0, &sdt_pll_dat, pll_get, pll_set, NULL },
+       { CGU_TUN_PLL, 0, CGU_TUN_IDIV, &sdt_pll_dat, idiv_get, idiv_set, idiv_off },
+       { CGU_HDMI_PLL, 0, 0, &hdmi_pll_dat, pll_get, pll_set, NULL },
+       { CGU_HDMI_PLL, 0, CGU_HDMI_IDIV_APB, &hdmi_pll_dat, idiv_get, idiv_set, idiv_off }
+};
+
+static inline void hsdk_idiv_write(struct hsdk_cgu_clk *clk, u32 val)
+{
+       iowrite32(val, clk->idiv_regs);
+}
+
+static inline u32 hsdk_idiv_read(struct hsdk_cgu_clk *clk)
+{
+       return ioread32(clk->idiv_regs);
+}
+
+static inline void hsdk_pll_write(struct hsdk_cgu_clk *clk, u32 reg, u32 val)
+{
+       iowrite32(val, clk->regs + reg);
+}
+
+static inline u32 hsdk_pll_read(struct hsdk_cgu_clk *clk, u32 reg)
+{
+       return ioread32(clk->regs + reg);
+}
+
+static inline void hsdk_pll_spcwrite(struct hsdk_cgu_clk *clk, u32 reg, u32 val)
+{
+       iowrite32(val, clk->spec_regs + reg);
+}
+
+static inline u32 hsdk_pll_spcread(struct hsdk_cgu_clk *clk, u32 reg)
+{
+       return ioread32(clk->spec_regs + reg);
+}
+
+static inline void hsdk_pll_set_cfg(struct hsdk_cgu_clk *clk,
+                                   const struct hsdk_pll_cfg *cfg)
+{
+       u32 val = 0;
+
+       /* Powerdown and Bypass bits should be cleared */
+       val |= cfg->idiv << CGU_PLL_CTRL_IDIV_SHIFT;
+       val |= cfg->fbdiv << CGU_PLL_CTRL_FBDIV_SHIFT;
+       val |= cfg->odiv << CGU_PLL_CTRL_ODIV_SHIFT;
+       val |= cfg->band << CGU_PLL_CTRL_BAND_SHIFT;
+
+       pr_debug("write configurarion: %#x\n", val);
+
+       hsdk_pll_write(clk, CGU_PLL_CTRL, val);
+}
+
+static inline bool hsdk_pll_is_locked(struct hsdk_cgu_clk *clk)
+{
+       return !!(hsdk_pll_read(clk, CGU_PLL_STATUS) & CGU_PLL_STATUS_LOCK);
+}
+
+static inline bool hsdk_pll_is_err(struct hsdk_cgu_clk *clk)
+{
+       return !!(hsdk_pll_read(clk, CGU_PLL_STATUS) & CGU_PLL_STATUS_ERR);
+}
+
+static ulong pll_get(struct clk *sclk)
+{
+       u32 val;
+       u64 rate;
+       u32 idiv, fbdiv, odiv;
+       struct hsdk_cgu_clk *clk = dev_get_priv(sclk->dev);
+
+       val = hsdk_pll_read(clk, CGU_PLL_CTRL);
+
+       pr_debug("current configurarion: %#x\n", val);
+
+       /* Check if PLL is disabled */
+       if (val & CGU_PLL_CTRL_PD)
+               return 0;
+
+       /* Check if PLL is bypassed */
+       if (val & CGU_PLL_CTRL_BYPASS)
+               return PARENT_RATE;
+
+       /* input divider = reg.idiv + 1 */
+       idiv = 1 + ((val & CGU_PLL_CTRL_IDIV_MASK) >> CGU_PLL_CTRL_IDIV_SHIFT);
+       /* fb divider = 2*(reg.fbdiv + 1) */
+       fbdiv = 2 * (1 + ((val & CGU_PLL_CTRL_FBDIV_MASK) >> CGU_PLL_CTRL_FBDIV_SHIFT));
+       /* output divider = 2^(reg.odiv) */
+       odiv = 1 << ((val & CGU_PLL_CTRL_ODIV_MASK) >> CGU_PLL_CTRL_ODIV_SHIFT);
+
+       rate = (u64)PARENT_RATE * fbdiv;
+       do_div(rate, idiv * odiv);
+
+       return rate;
+}
+
+static unsigned long hsdk_pll_round_rate(struct clk *sclk, unsigned long rate)
+{
+       int i;
+       unsigned long best_rate;
+       struct hsdk_cgu_clk *clk = dev_get_priv(sclk->dev);
+       const struct hsdk_pll_cfg *pll_cfg = clk->pll_devdata->pll_cfg;
+
+       if (pll_cfg[0].rate == 0)
+               return -EINVAL;
+
+       best_rate = pll_cfg[0].rate;
+
+       for (i = 1; pll_cfg[i].rate != 0; i++) {
+               if (abs(rate - pll_cfg[i].rate) < abs(rate - best_rate))
+                       best_rate = pll_cfg[i].rate;
+       }
+
+       pr_debug("chosen best rate: %lu\n", best_rate);
+
+       return best_rate;
+}
+
+static int hsdk_pll_comm_update_rate(struct hsdk_cgu_clk *clk,
+                                    unsigned long rate,
+                                    const struct hsdk_pll_cfg *cfg)
+{
+       hsdk_pll_set_cfg(clk, cfg);
+
+       /*
+        * Wait until CGU relocks and check error status.
+        * If after timeout CGU is unlocked yet return error.
+        */
+       udelay(HSDK_PLL_MAX_LOCK_TIME);
+       if (!hsdk_pll_is_locked(clk))
+               return -ETIMEDOUT;
+
+       if (hsdk_pll_is_err(clk))
+               return -EINVAL;
+
+       return 0;
+}
+
+static int hsdk_pll_core_update_rate(struct hsdk_cgu_clk *clk,
+                                    unsigned long rate,
+                                    const struct hsdk_pll_cfg *cfg)
+{
+       /*
+        * When core clock exceeds 500MHz, the divider for the interface
+        * clock must be programmed to div-by-2.
+        */
+       if (rate > CORE_IF_CLK_THRESHOLD_HZ)
+               hsdk_pll_spcwrite(clk, CREG_CORE_IF_DIV, CREG_CORE_IF_CLK_DIV_2);
+
+       hsdk_pll_set_cfg(clk, cfg);
+
+       /*
+        * Wait until CGU relocks and check error status.
+        * If after timeout CGU is unlocked yet return error.
+        */
+       udelay(HSDK_PLL_MAX_LOCK_TIME);
+       if (!hsdk_pll_is_locked(clk))
+               return -ETIMEDOUT;
+
+       if (hsdk_pll_is_err(clk))
+               return -EINVAL;
+
+       /*
+        * Program divider to div-by-1 if we succesfuly set core clock below
+        * 500MHz threshold.
+        */
+       if (rate <= CORE_IF_CLK_THRESHOLD_HZ)
+               hsdk_pll_spcwrite(clk, CREG_CORE_IF_DIV, CREG_CORE_IF_CLK_DIV_1);
+
+       return 0;
+}
+
+static ulong pll_set(struct clk *sclk, ulong rate)
+{
+       int i;
+       unsigned long best_rate;
+       struct hsdk_cgu_clk *clk = dev_get_priv(sclk->dev);
+       const struct hsdk_pll_cfg *pll_cfg = clk->pll_devdata->pll_cfg;
+
+       best_rate = hsdk_pll_round_rate(sclk, rate);
+
+       for (i = 0; pll_cfg[i].rate != 0; i++) {
+               if (pll_cfg[i].rate == best_rate) {
+                       return clk->pll_devdata->update_rate(clk, best_rate,
+                                                            &pll_cfg[i]);
+               }
+       }
+
+       pr_err("invalid rate=%ld, parent_rate=%d\n", best_rate, PARENT_RATE);
+
+       return -EINVAL;
+}
+
+static int idiv_off(struct clk *sclk)
+{
+       struct hsdk_cgu_clk *clk = dev_get_priv(sclk->dev);
+
+       hsdk_idiv_write(clk, 0);
+
+       return 0;
+}
+
+static ulong idiv_get(struct clk *sclk)
+{
+       struct hsdk_cgu_clk *clk = dev_get_priv(sclk->dev);
+       ulong parent_rate = pll_get(sclk);
+       u32 div_factor = hsdk_idiv_read(clk);
+
+       div_factor &= CGU_IDIV_MASK;
+
+       pr_debug("current configurarion: %#x (%d)\n", div_factor, div_factor);
+
+       if (div_factor == 0)
+               return 0;
+
+       return parent_rate / div_factor;
+}
+
+static ulong idiv_set(struct clk *sclk, ulong rate)
+{
+       struct hsdk_cgu_clk *clk = dev_get_priv(sclk->dev);
+       ulong parent_rate = pll_get(sclk);
+       u32 div_factor;
+
+       div_factor = parent_rate / rate;
+       if (abs(rate - parent_rate / (div_factor + 1)) <=
+           abs(rate - parent_rate / div_factor)) {
+               div_factor += 1;
+       }
+
+       if (div_factor & ~CGU_IDIV_MASK) {
+               pr_err("invalid rate=%ld, parent_rate=%ld, div=%d: max divider valie is%d\n",
+                      rate, parent_rate, div_factor, CGU_IDIV_MASK);
+
+               div_factor = CGU_IDIV_MASK;
+       }
+
+       if (div_factor == 0) {
+               pr_err("invalid rate=%ld, parent_rate=%ld, div=%d: min divider valie is 1\n",
+                      rate, parent_rate, div_factor);
+
+               div_factor = 1;
+       }
+
+       hsdk_idiv_write(clk, div_factor);
+
+       return 0;
+}
+
+static int hsdk_prepare_clock_tree_branch(struct clk *sclk)
+{
+       struct hsdk_cgu_clk *clk = dev_get_priv(sclk->dev);
+
+       if (sclk->id >= CGU_MAX_CLOCKS)
+               return -EINVAL;
+
+       clk->pll_devdata = clock_map[sclk->id].pll_devdata;
+       clk->regs = clk->cgu_regs + clock_map[sclk->id].cgu_pll_oft;
+       clk->spec_regs = clk->creg_regs + clock_map[sclk->id].creg_div_oft;
+       clk->idiv_regs = clk->cgu_regs + clock_map[sclk->id].cgu_div_oft;
+
+       return 0;
+}
+
+static ulong hsdk_cgu_get_rate(struct clk *sclk)
+{
+       if (hsdk_prepare_clock_tree_branch(sclk))
+               return -EINVAL;
+
+       return clock_map[sclk->id].get_rate(sclk);
+}
+
+static ulong hsdk_cgu_set_rate(struct clk *sclk, ulong rate)
+{
+       if (hsdk_prepare_clock_tree_branch(sclk))
+               return -EINVAL;
+
+       return clock_map[sclk->id].set_rate(sclk, rate);
+}
+
+static int hsdk_cgu_disable(struct clk *sclk)
+{
+       if (hsdk_prepare_clock_tree_branch(sclk))
+               return -EINVAL;
+
+       if (clock_map[sclk->id].disable)
+               return clock_map[sclk->id].disable(sclk);
+
+       return -ENOTSUPP;
+}
+
+static const struct clk_ops hsdk_cgu_ops = {
+       .set_rate = hsdk_cgu_set_rate,
+       .get_rate = hsdk_cgu_get_rate,
+       .disable = hsdk_cgu_disable,
+};
+
+static int hsdk_cgu_clk_probe(struct udevice *dev)
+{
+       struct hsdk_cgu_clk *pll_clk = dev_get_priv(dev);
+
+       BUILD_BUG_ON(ARRAY_SIZE(clock_map) != CGU_MAX_CLOCKS);
+
+       pll_clk->cgu_regs = (void __iomem *)devfdt_get_addr_index(dev, 0);
+       if (!pll_clk->cgu_regs)
+               return -EINVAL;
+
+       pll_clk->creg_regs = (void __iomem *)devfdt_get_addr_index(dev, 1);
+       if (!pll_clk->creg_regs)
+               return -EINVAL;
+
+       return 0;
+}
+
+static const struct udevice_id hsdk_cgu_clk_id[] = {
+       { .compatible = "snps,hsdk-cgu-clock" },
+       { }
+};
+
+U_BOOT_DRIVER(hsdk_cgu_clk) = {
+       .name = "hsdk-cgu-clk",
+       .id = UCLASS_CLK,
+       .of_match = hsdk_cgu_clk_id,
+       .probe = hsdk_cgu_clk_probe,
+       .platdata_auto_alloc_size = sizeof(struct hsdk_cgu_clk),
+       .ops = &hsdk_cgu_ops,
+};
index 07640d1ccf9cea5677c62e76d1d69e946708bfd0..8eca88c6ee8384d6b24d68fec1d94a60c2110a22 100644 (file)
@@ -5,9 +5,8 @@ config CLK_RENESAS
          Enable support for clock present on Renesas RCar SoCs.
 
 config CLK_RCAR_GEN3
-       bool "Renesas RCar Gen3 R8A7795/R8A7796 clock driver"
+       bool "Renesas RCar Gen3 clock driver"
        def_bool y if RCAR_GEN3
        depends on CLK_RENESAS
        help
-         Enable this to support the clocks on Renesas RCar Gen3
-         R8A7795 and R8A7796 SoC.
+         Enable this to support the clocks on Renesas RCar Gen3 SoC.
index 5abb171827ee30e7fcf33e485e54f12c64e5f452..b26bbcc59fb7317e256638f1c8446117574fe5f9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Renesas RCar Gen3 R8A7795/R8A7796 CPG MSSR driver
+ * Renesas RCar Gen3 CPG MSSR driver
  *
  * Copyright (C) 2017 Marek Vasut <marek.vasut@gmail.com>
  *
@@ -20,6 +20,8 @@
 
 #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
 #include <dt-bindings/clock/r8a7796-cpg-mssr.h>
+#include <dt-bindings/clock/r8a77970-cpg-mssr.h>
+#include <dt-bindings/clock/r8a77995-cpg-mssr.h>
 
 #define CPG_RST_MODEMR         0x0060
 
@@ -126,6 +128,10 @@ enum clk_types {
        DEF_BASE(_name, _id, CLK_TYPE_GEN3_SD, _parent, .offset = _offset)
 #define DEF_GEN3_RPC(_name, _id, _parent, _offset)     \
        DEF_BASE(_name, _id, CLK_TYPE_GEN3_RPC, _parent, .offset = _offset)
+#define DEF_GEN3_PE(_name, _id, _parent_sscg, _div_sscg, _parent_clean, \
+                   _div_clean) \
+       DEF_BASE(_name, _id, CLK_TYPE_FF,                       \
+                (_parent_clean), .div = (_div_clean), 1)
 
 /*
  * Definitions of Module Clocks
@@ -154,6 +160,8 @@ enum rcar_gen3_clk_types {
        CLK_TYPE_GEN3_SD,
        CLK_TYPE_GEN3_RPC,
        CLK_TYPE_GEN3_R,
+       CLK_TYPE_GEN3_PE,
+       CLK_TYPE_GEN3_Z2,
 };
 
 struct rcar_gen3_cpg_pll_config {
@@ -179,6 +187,11 @@ enum clk_ids {
        CLK_PLL4,
        CLK_PLL1_DIV2,
        CLK_PLL1_DIV4,
+       CLK_PLL0D2,
+       CLK_PLL0D3,
+       CLK_PLL0D5,
+       CLK_PLL1D2,
+       CLK_PE,
        CLK_S0,
        CLK_S1,
        CLK_S2,
@@ -558,7 +571,7 @@ static const struct mssr_mod_clk r8a7796_mod_clks[] = {
        DEF_MOD("can-fd",                914,   R8A7796_CLK_S3D2),
        DEF_MOD("can-if1",               915,   R8A7796_CLK_S3D4),
        DEF_MOD("can-if0",               916,   R8A7796_CLK_S3D4),
-       DEF_MOD("rpc",                   917,   R8A7795_CLK_RPC),
+       DEF_MOD("rpc",                   917,   R8A7796_CLK_RPC),
        DEF_MOD("i2c6",                  918,   R8A7796_CLK_S0D6),
        DEF_MOD("i2c5",                  919,   R8A7796_CLK_S0D6),
        DEF_MOD("i2c-dvfs",              926,   R8A7796_CLK_CP),
@@ -595,6 +608,219 @@ static const struct mssr_mod_clk r8a7796_mod_clks[] = {
        DEF_MOD("scu-src0",             1031,   MOD_CLK_ID(1017)),
 };
 
+static const struct cpg_core_clk r8a77970_core_clks[] = {
+       /* External Clock Inputs */
+       DEF_INPUT("extal",  CLK_EXTAL),
+       DEF_INPUT("extalr", CLK_EXTALR),
+
+       /* Internal Core Clocks */
+       DEF_BASE(".main",       CLK_MAIN, CLK_TYPE_GEN3_MAIN, CLK_EXTAL),
+       DEF_BASE(".pll0",       CLK_PLL0, CLK_TYPE_GEN3_PLL0, CLK_MAIN),
+       DEF_BASE(".pll1",       CLK_PLL1, CLK_TYPE_GEN3_PLL1, CLK_MAIN),
+       DEF_BASE(".pll3",       CLK_PLL3, CLK_TYPE_GEN3_PLL3, CLK_MAIN),
+
+       DEF_FIXED(".pll1_div2", CLK_PLL1_DIV2,     CLK_PLL1,       2, 1),
+       DEF_FIXED(".pll1_div4", CLK_PLL1_DIV4,     CLK_PLL1_DIV2,  2, 1),
+       DEF_FIXED(".s1",        CLK_S1,            CLK_PLL1_DIV2,  4, 1),
+       DEF_FIXED(".s2",        CLK_S2,            CLK_PLL1_DIV2,  6, 1),
+       DEF_FIXED(".rpcsrc",    CLK_RPCSRC,        CLK_PLL1,       2, 1),
+
+       /* Core Clock Outputs */
+       DEF_BASE("z2",          R8A77970_CLK_Z2,    CLK_TYPE_GEN3_Z2, CLK_PLL1_DIV4),
+       DEF_FIXED("ztr",        R8A77970_CLK_ZTR,   CLK_PLL1_DIV2,  6, 1),
+       DEF_FIXED("ztrd2",      R8A77970_CLK_ZTRD2, CLK_PLL1_DIV2, 12, 1),
+       DEF_FIXED("zt",         R8A77970_CLK_ZT,    CLK_PLL1_DIV2,  4, 1),
+       DEF_FIXED("zx",         R8A77970_CLK_ZX,    CLK_PLL1_DIV2,  3, 1),
+       DEF_FIXED("s1d1",       R8A77970_CLK_S1D1,  CLK_S1,         1, 1),
+       DEF_FIXED("s1d2",       R8A77970_CLK_S1D2,  CLK_S1,         2, 1),
+       DEF_FIXED("s1d4",       R8A77970_CLK_S1D4,  CLK_S1,         4, 1),
+       DEF_FIXED("s2d1",       R8A77970_CLK_S2D1,  CLK_S2,         1, 1),
+       DEF_FIXED("s2d2",       R8A77970_CLK_S2D2,  CLK_S2,         2, 1),
+       DEF_FIXED("s2d4",       R8A77970_CLK_S2D4,  CLK_S2,         4, 1),
+
+       DEF_GEN3_SD("sd0",      R8A77970_CLK_SD0,   CLK_PLL1_DIV4, 0x0074),
+
+       DEF_GEN3_RPC("rpc",     R8A77970_CLK_RPC,   CLK_RPCSRC,    0x238),
+
+       DEF_FIXED("cl",         R8A77970_CLK_CL,    CLK_PLL1_DIV2, 48, 1),
+       DEF_FIXED("cp",         R8A77970_CLK_CP,    CLK_EXTAL,      2, 1),
+
+       /* NOTE: HDMI, CSI, CAN etc. clock are missing */
+
+       DEF_BASE("r",           R8A77970_CLK_R, CLK_TYPE_GEN3_R, CLK_RINT),
+};
+
+static const struct mssr_mod_clk r8a77970_mod_clks[] = {
+       DEF_MOD("ivcp1e",                127,   R8A77970_CLK_S2D1),
+       DEF_MOD("scif4",                 203,   R8A77970_CLK_S2D4),     /* @@ H3=S3D4 */
+       DEF_MOD("scif3",                 204,   R8A77970_CLK_S2D4),     /* @@ H3=S3D4 */
+       DEF_MOD("scif1",                 206,   R8A77970_CLK_S2D4),     /* @@ H3=S3D4 */
+       DEF_MOD("scif0",                 207,   R8A77970_CLK_S2D4),     /* @@ H3=S3D4 */
+       DEF_MOD("msiof3",                208,   R8A77970_CLK_MSO),
+       DEF_MOD("msiof2",                209,   R8A77970_CLK_MSO),
+       DEF_MOD("msiof1",                210,   R8A77970_CLK_MSO),
+       DEF_MOD("msiof0",                211,   R8A77970_CLK_MSO),
+       DEF_MOD("mfis",                  213,   R8A77970_CLK_S2D2),     /* @@ H3=S3D2 */
+       DEF_MOD("sys-dmac2",     217,   R8A77970_CLK_S2D1),     /* @@ H3=S3D1 */
+       DEF_MOD("sys-dmac1",     218,   R8A77970_CLK_S2D1),     /* @@ H3=S3D1 */
+       DEF_MOD("sdif",                  314,   R8A77970_CLK_SD0),
+       DEF_MOD("rwdt0",                 402,   R8A77970_CLK_R),
+       DEF_MOD("intc-ex",               407,   R8A77970_CLK_CP),
+       DEF_MOD("intc-ap",               408,   R8A77970_CLK_S2D1),     /* @@ H3=S3D1 */
+       DEF_MOD("hscif3",                517,   R8A77970_CLK_S2D1),     /* @@ H3=S3D1 */
+       DEF_MOD("hscif2",                518,   R8A77970_CLK_S2D1),     /* @@ H3=S3D1 */
+       DEF_MOD("hscif1",                519,   R8A77970_CLK_S2D1),     /* @@ H3=S3D1 */
+       DEF_MOD("hscif0",                520,   R8A77970_CLK_S2D1),     /* @@ H3=S3D1 */
+       DEF_MOD("thermal",               522,   R8A77970_CLK_CP),
+       DEF_MOD("pwm",                   523,   R8A77970_CLK_S2D4),
+       DEF_MOD("fcpvd0",                603,   R8A77970_CLK_S2D1),
+       DEF_MOD("vspd0",                 623,   R8A77970_CLK_S2D1),
+       DEF_MOD("csi40",                 716,   R8A77970_CLK_CSI0),
+       DEF_MOD("du0",                   724,   R8A77970_CLK_S2D1),
+       DEF_MOD("lvds",                  727,   R8A77970_CLK_S2D1),
+       DEF_MOD("vin3",                  808,   R8A77970_CLK_S2D1),
+       DEF_MOD("vin2",                  809,   R8A77970_CLK_S2D1),
+       DEF_MOD("vin1",                  810,   R8A77970_CLK_S2D1),
+       DEF_MOD("vin0",                  811,   R8A77970_CLK_S2D1),
+       DEF_MOD("etheravb",              812,   R8A77970_CLK_S2D2),
+       DEF_MOD("isp",                   817,   R8A77970_CLK_S2D1),
+       DEF_MOD("gpio5",                 907,   R8A77970_CLK_CP),
+       DEF_MOD("gpio4",                 908,   R8A77970_CLK_CP),
+       DEF_MOD("gpio3",                 909,   R8A77970_CLK_CP),
+       DEF_MOD("gpio2",                 910,   R8A77970_CLK_CP),
+       DEF_MOD("gpio1",                 911,   R8A77970_CLK_CP),
+       DEF_MOD("gpio0",                 912,   R8A77970_CLK_CP),
+       DEF_MOD("can-fd",                914,   R8A77970_CLK_S2D2),
+       DEF_MOD("rpc",                   917,   R8A77970_CLK_RPC),
+       DEF_MOD("i2c4",                  927,   R8A77970_CLK_S2D2),
+       DEF_MOD("i2c3",                  928,   R8A77970_CLK_S2D2),
+       DEF_MOD("i2c2",                  929,   R8A77970_CLK_S2D2),
+       DEF_MOD("i2c1",                  930,   R8A77970_CLK_S2D2),
+       DEF_MOD("i2c0",                  931,   R8A77970_CLK_S2D2),
+};
+
+static const struct cpg_core_clk r8a77995_core_clks[] = {
+       /* External Clock Inputs */
+       DEF_INPUT("extal",     CLK_EXTAL),
+
+       /* Internal Core Clocks */
+       DEF_BASE(".main",      CLK_MAIN, CLK_TYPE_GEN3_MAIN,       CLK_EXTAL),
+       DEF_BASE(".pll1",      CLK_PLL1, CLK_TYPE_GEN3_PLL1,       CLK_MAIN),
+       DEF_BASE(".pll3",      CLK_PLL3, CLK_TYPE_GEN3_PLL3,       CLK_MAIN),
+
+       DEF_FIXED(".pll0",     CLK_PLL0,           CLK_MAIN,       4, 250),
+       DEF_FIXED(".pll0d2",   CLK_PLL0D2,         CLK_PLL0,       2, 1),
+       DEF_FIXED(".pll0d3",   CLK_PLL0D3,         CLK_PLL0,       3, 1),
+       DEF_FIXED(".pll0d5",   CLK_PLL0D5,         CLK_PLL0,       5, 1),
+       DEF_FIXED(".pll1d2",   CLK_PLL1D2,         CLK_PLL1,       2, 1),
+       DEF_FIXED(".pe",       CLK_PE,             CLK_PLL0D3,     4, 1),
+       DEF_FIXED(".s0",       CLK_S0,             CLK_PLL1,       2, 1),
+       DEF_FIXED(".s1",       CLK_S1,             CLK_PLL1,       3, 1),
+       DEF_FIXED(".s2",       CLK_S2,             CLK_PLL1,       4, 1),
+       DEF_FIXED(".s3",       CLK_S3,             CLK_PLL1,       6, 1),
+       DEF_FIXED(".sdsrc",    CLK_SDSRC,          CLK_PLL1,       2, 1),
+
+       /* Core Clock Outputs */
+       DEF_FIXED("z2",        R8A77995_CLK_Z2,    CLK_PLL0D3,     1, 1),
+       DEF_FIXED("ztr",       R8A77995_CLK_ZTR,   CLK_PLL1,       6, 1),
+       DEF_FIXED("zt",        R8A77995_CLK_ZT,    CLK_PLL1,       4, 1),
+       DEF_FIXED("zx",        R8A77995_CLK_ZX,    CLK_PLL1,       3, 1),
+       DEF_FIXED("s0d1",      R8A77995_CLK_S0D1,  CLK_S0,         1, 1),
+       DEF_FIXED("s1d1",      R8A77995_CLK_S1D1,  CLK_S1,         1, 1),
+       DEF_FIXED("s1d2",      R8A77995_CLK_S1D2,  CLK_S1,         2, 1),
+       DEF_FIXED("s1d4",      R8A77995_CLK_S1D4,  CLK_S1,         4, 1),
+       DEF_FIXED("s2d1",      R8A77995_CLK_S2D1,  CLK_S2,         1, 1),
+       DEF_FIXED("s2d2",      R8A77995_CLK_S2D2,  CLK_S2,         2, 1),
+       DEF_FIXED("s2d4",      R8A77995_CLK_S2D4,  CLK_S2,         4, 1),
+       DEF_FIXED("s3d1",      R8A77995_CLK_S3D1,  CLK_S3,         1, 1),
+       DEF_FIXED("s3d2",      R8A77995_CLK_S3D2,  CLK_S3,         2, 1),
+       DEF_FIXED("s3d4",      R8A77995_CLK_S3D4,  CLK_S3,         4, 1),
+
+       DEF_FIXED("cl",        R8A77995_CLK_CL,    CLK_PLL1,      48, 1),
+       DEF_FIXED("cp",        R8A77995_CLK_CP,    CLK_EXTAL,      2, 1),
+       DEF_FIXED("osc",       R8A77995_CLK_OSC,   CLK_EXTAL,    384, 1),
+       DEF_FIXED("r",         R8A77995_CLK_R,     CLK_EXTAL,   1536, 1),
+
+       DEF_GEN3_PE("s1d4c",   R8A77995_CLK_S1D4C, CLK_S1, 4, CLK_PE, 2),
+       DEF_GEN3_PE("s3d1c",   R8A77995_CLK_S3D1C, CLK_S3, 1, CLK_PE, 1),
+       DEF_GEN3_PE("s3d2c",   R8A77995_CLK_S3D2C, CLK_S3, 2, CLK_PE, 2),
+       DEF_GEN3_PE("s3d4c",   R8A77995_CLK_S3D4C, CLK_S3, 4, CLK_PE, 4),
+
+       DEF_GEN3_SD("sd0",     R8A77995_CLK_SD0,   CLK_SDSRC,     0x268),
+};
+
+static const struct mssr_mod_clk r8a77995_mod_clks[] = {
+       DEF_MOD("scif5",                 202,   R8A77995_CLK_S3D4C),
+       DEF_MOD("scif4",                 203,   R8A77995_CLK_S3D4C),
+       DEF_MOD("scif3",                 204,   R8A77995_CLK_S3D4C),
+       DEF_MOD("scif1",                 206,   R8A77995_CLK_S3D4C),
+       DEF_MOD("scif0",                 207,   R8A77995_CLK_S3D4C),
+       DEF_MOD("msiof3",                208,   R8A77995_CLK_MSO),
+       DEF_MOD("msiof2",                209,   R8A77995_CLK_MSO),
+       DEF_MOD("msiof1",                210,   R8A77995_CLK_MSO),
+       DEF_MOD("msiof0",                211,   R8A77995_CLK_MSO),
+       DEF_MOD("sys-dmac2",             217,   R8A77995_CLK_S3D1),
+       DEF_MOD("sys-dmac1",             218,   R8A77995_CLK_S3D1),
+       DEF_MOD("sys-dmac0",             219,   R8A77995_CLK_S3D1),
+       DEF_MOD("cmt3",                  300,   R8A77995_CLK_R),
+       DEF_MOD("cmt2",                  301,   R8A77995_CLK_R),
+       DEF_MOD("cmt1",                  302,   R8A77995_CLK_R),
+       DEF_MOD("cmt0",                  303,   R8A77995_CLK_R),
+       DEF_MOD("scif2",                 310,   R8A77995_CLK_S3D4C),
+       DEF_MOD("emmc0",                 312,   R8A77995_CLK_SD0),
+       DEF_MOD("usb-dmac0",             330,   R8A77995_CLK_S3D1),
+       DEF_MOD("usb-dmac1",             331,   R8A77995_CLK_S3D1),
+       DEF_MOD("rwdt",                  402,   R8A77995_CLK_R),
+       DEF_MOD("intc-ex",               407,   R8A77995_CLK_CP),
+       DEF_MOD("intc-ap",               408,   R8A77995_CLK_S3D1),
+       DEF_MOD("audmac0",               502,   R8A77995_CLK_S3D1),
+       DEF_MOD("hscif3",                517,   R8A77995_CLK_S3D1C),
+       DEF_MOD("hscif0",                520,   R8A77995_CLK_S3D1C),
+       DEF_MOD("thermal",               522,   R8A77995_CLK_CP),
+       DEF_MOD("pwm",                   523,   R8A77995_CLK_S3D4C),
+       DEF_MOD("fcpvd1",                602,   R8A77995_CLK_S1D2),
+       DEF_MOD("fcpvd0",                603,   R8A77995_CLK_S1D2),
+       DEF_MOD("fcpvbs",                607,   R8A77995_CLK_S0D1),
+       DEF_MOD("vspd1",                 622,   R8A77995_CLK_S1D2),
+       DEF_MOD("vspd0",                 623,   R8A77995_CLK_S1D2),
+       DEF_MOD("vspbs",                 627,   R8A77995_CLK_S0D1),
+       DEF_MOD("ehci0",                 703,   R8A77995_CLK_S3D2),
+       DEF_MOD("hsusb",                 704,   R8A77995_CLK_S3D2),
+       DEF_MOD("du1",                   723,   R8A77995_CLK_S2D1),
+       DEF_MOD("du0",                   724,   R8A77995_CLK_S2D1),
+       DEF_MOD("lvds",                  727,   R8A77995_CLK_S2D1),
+       DEF_MOD("vin7",                  804,   R8A77995_CLK_S1D2),
+       DEF_MOD("vin6",                  805,   R8A77995_CLK_S1D2),
+       DEF_MOD("vin5",                  806,   R8A77995_CLK_S1D2),
+       DEF_MOD("vin4",                  807,   R8A77995_CLK_S1D2),
+       DEF_MOD("etheravb",              812,   R8A77995_CLK_S3D2),
+       DEF_MOD("imr0",                  823,   R8A77995_CLK_S1D2),
+       DEF_MOD("gpio6",                 906,   R8A77995_CLK_S3D4),
+       DEF_MOD("gpio5",                 907,   R8A77995_CLK_S3D4),
+       DEF_MOD("gpio4",                 908,   R8A77995_CLK_S3D4),
+       DEF_MOD("gpio3",                 909,   R8A77995_CLK_S3D4),
+       DEF_MOD("gpio2",                 910,   R8A77995_CLK_S3D4),
+       DEF_MOD("gpio1",                 911,   R8A77995_CLK_S3D4),
+       DEF_MOD("gpio0",                 912,   R8A77995_CLK_S3D4),
+       DEF_MOD("can-fd",                914,   R8A77995_CLK_S3D2),
+       DEF_MOD("can-if1",               915,   R8A77995_CLK_S3D4),
+       DEF_MOD("can-if0",               916,   R8A77995_CLK_S3D4),
+       DEF_MOD("i2c3",                  928,   R8A77995_CLK_S3D2),
+       DEF_MOD("i2c2",                  929,   R8A77995_CLK_S3D2),
+       DEF_MOD("i2c1",                  930,   R8A77995_CLK_S3D2),
+       DEF_MOD("i2c0",                  931,   R8A77995_CLK_S3D2),
+       DEF_MOD("ssi-all",              1005,   R8A77995_CLK_S3D4),
+       DEF_MOD("ssi4",                 1011,   MOD_CLK_ID(1005)),
+       DEF_MOD("ssi3",                 1012,   MOD_CLK_ID(1005)),
+       DEF_MOD("scu-all",              1017,   R8A77995_CLK_S3D4),
+       DEF_MOD("scu-dvc1",             1018,   MOD_CLK_ID(1017)),
+       DEF_MOD("scu-dvc0",             1019,   MOD_CLK_ID(1017)),
+       DEF_MOD("scu-ctu1-mix1",        1020,   MOD_CLK_ID(1017)),
+       DEF_MOD("scu-ctu0-mix0",        1021,   MOD_CLK_ID(1017)),
+       DEF_MOD("scu-src6",             1025,   MOD_CLK_ID(1017)),
+       DEF_MOD("scu-src5",             1026,   MOD_CLK_ID(1017)),
+};
+
 /*
  * CPG Clock Data
  */
@@ -931,6 +1157,7 @@ static ulong gen3_clk_get_rate(struct clk *clk)
                return rate;
 
        case CLK_TYPE_FF:
+       case CLK_TYPE_GEN3_PE:          /* FIXME */
                rate = (gen3_clk_get_rate(&parent) * core->mult) / core->div;
                debug("%s[%i] FIXED clk: parent=%i div=%i mul=%i => rate=%u\n",
                      __func__, __LINE__,
@@ -1015,6 +1242,8 @@ static const struct clk_ops gen3_clk_ops = {
 enum gen3_clk_model {
        CLK_R8A7795,
        CLK_R8A7796,
+       CLK_R8A77970,
+       CLK_R8A77995,
 };
 
 static int gen3_clk_probe(struct udevice *dev)
@@ -1050,6 +1279,26 @@ static int gen3_clk_probe(struct udevice *dev)
                if (ret < 0)
                        return ret;
                break;
+       case CLK_R8A77970:
+               priv->core_clk = r8a77970_core_clks;
+               priv->core_clk_size = ARRAY_SIZE(r8a77970_core_clks);
+               priv->mod_clk = r8a77970_mod_clks;
+               priv->mod_clk_size = ARRAY_SIZE(r8a77970_mod_clks);
+               ret = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
+                                                   "renesas,r8a77970-rst");
+               if (ret < 0)
+                       return ret;
+               break;
+       case CLK_R8A77995:
+               priv->core_clk = r8a77995_core_clks;
+               priv->core_clk_size = ARRAY_SIZE(r8a77995_core_clks);
+               priv->mod_clk = r8a77995_mod_clks;
+               priv->mod_clk_size = ARRAY_SIZE(r8a77995_mod_clks);
+               ret = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
+                                                   "renesas,r8a77995-rst");
+               if (ret < 0)
+                       return ret;
+               break;
        default:
                return -EINVAL;
        }
@@ -1068,9 +1317,11 @@ static int gen3_clk_probe(struct udevice *dev)
        if (ret < 0)
                return ret;
 
-       ret = clk_get_by_name(dev, "extalr", &priv->clk_extalr);
-       if (ret < 0)
-               return ret;
+       if (model != CLK_R8A77995) {
+               ret = clk_get_by_name(dev, "extalr", &priv->clk_extalr);
+               if (ret < 0)
+                       return ret;
+       }
 
        return 0;
 }
@@ -1098,6 +1349,24 @@ static struct mstp_stop_table r8a7796_mstp_table[] = {
        { 0xFFFEFFE0, 0x0 },    { 0x000000B7, 0x0 },
 };
 
+static struct mstp_stop_table r8a77970_mstp_table[] = {
+       { 0x00230000, 0x0 },    { 0xFFFFFFFF, 0x0 },
+       { 0x14062FD8, 0x2040 }, { 0xFFFFFFDF, 0x400 },
+       { 0x80000184, 0x180 },  { 0x83FFFFFF, 0x0 },
+       { 0xFFFFFFFF, 0x0 },    { 0xFFFFFFFF, 0x0 },
+       { 0x7FF3FFF4, 0x0 },    { 0xFBF7FF97, 0x0 },
+       { 0xFFFEFFE0, 0x0 },    { 0x000000B7, 0x0 },
+};
+
+static struct mstp_stop_table r8a77995_mstp_table[] = {
+       { 0x00200000, 0x0 },    { 0xFFFFFFFF, 0x0 },
+       { 0x340E2FDC, 0x2040 }, { 0xFFFFFFDF, 0x400 },
+       { 0x80000184, 0x180 },  { 0xC3FFFFFF, 0x0 },
+       { 0xFFFFFFFF, 0x0 },    { 0xFFFFFFFF, 0x0 },
+       { 0x01F1FFF7, 0x0 },    { 0xFFFFFFFE, 0x0 },
+       { 0xFFFEFFE0, 0x0 },    { 0x000000B7, 0x0 },
+};
+
 #define TSTR0          0x04
 #define TSTR0_STR0     BIT(0)
 
@@ -1117,6 +1386,14 @@ static int gen3_clk_remove(struct udevice *dev)
                tbl = r8a7796_mstp_table;
                tbl_size = ARRAY_SIZE(r8a7796_mstp_table);
                break;
+       case CLK_R8A77970:
+               tbl = r8a77970_mstp_table;
+               tbl_size = ARRAY_SIZE(r8a77970_mstp_table);
+               break;
+       case CLK_R8A77995:
+               tbl = r8a77995_mstp_table;
+               tbl_size = ARRAY_SIZE(r8a77995_mstp_table);
+               break;
        default:
                return -EINVAL;
        }
@@ -1136,6 +1413,8 @@ static int gen3_clk_remove(struct udevice *dev)
 static const struct udevice_id gen3_clk_ids[] = {
        { .compatible = "renesas,r8a7795-cpg-mssr", .data = CLK_R8A7795 },
        { .compatible = "renesas,r8a7796-cpg-mssr", .data = CLK_R8A7796 },
+       { .compatible = "renesas,r8a77970-cpg-mssr", .data = CLK_R8A77970 },
+       { .compatible = "renesas,r8a77995-cpg-mssr", .data = CLK_R8A77995 },
        { }
 };
 
index 2acb33bb51bc9bb709ae1f942f0c3acb99360f47..b4e859e40cfe3b7f4796f17a3be0985c06be6ab2 100644 (file)
@@ -82,7 +82,7 @@ config IMX_RGPIO2P
 
 config HSDK_CREG_GPIO
        bool "HSDK CREG GPIO griver"
-       depends on DM
+       depends on DM_GPIO
        default n
        help
          This driver supports CREG GPIOs on Synopsys HSDK SOC.
index cb9f4258842f55e3edb4166b3fb2c33ef59b88a6..ddedbe6c0e3900699147eefc404c7817f7e869fb 100644 (file)
@@ -174,6 +174,9 @@ static int rcar_gpio_probe(struct udevice *dev)
 static const struct udevice_id rcar_gpio_ids[] = {
        { .compatible = "renesas,gpio-r8a7795" },
        { .compatible = "renesas,gpio-r8a7796" },
+       { .compatible = "renesas,gpio-r8a77970" },
+       { .compatible = "renesas,gpio-r8a77995" },
+       { .compatible = "renesas,rcar-gen3-gpio" },
        { /* sentinel */ }
 };
 
index 0d1203cb766ff0c045fc8e4857afe3e4ba60daf7..741f9dfd9cd45141e450357b2d8faa1b687bf42a 100644 (file)
@@ -849,6 +849,8 @@ static int uniphier_sd_probe(struct udevice *dev)
 static const struct udevice_id uniphier_sd_match[] = {
        { .compatible = "renesas,sdhi-r8a7795", .data = UNIPHIER_SD_CAP_64BIT },
        { .compatible = "renesas,sdhi-r8a7796", .data = UNIPHIER_SD_CAP_64BIT },
+       { .compatible = "renesas,sdhi-r8a77970", .data = UNIPHIER_SD_CAP_64BIT },
+       { .compatible = "renesas,sdhi-r8a77995", .data = UNIPHIER_SD_CAP_64BIT },
        { .compatible = "socionext,uniphier-sdhc", .data = 0 },
        { /* sentinel */ }
 };
index 47ec43500cb4c880f5d88f1049ce52c024bbbbe6..78a39abf7542e122e5c59be6dbb7cf07156c8913 100644 (file)
@@ -10,15 +10,14 @@ config SYS_NAND_SELF_INIT
          NAND initialization process.
 
 config NAND_DENALI
-       bool "Support Denali NAND controller"
+       bool
        select SYS_NAND_SELF_INIT
        imply CMD_NAND
-       help
-         Enable support for the Denali NAND controller.
 
 config NAND_DENALI_DT
        bool "Support Denali NAND controller as a DT device"
-       depends on NAND_DENALI && OF_CONTROL && DM
+       select NAND_DENALI
+       depends on OF_CONTROL && DM
        help
          Enable the driver for NAND flash on platforms using a Denali NAND
          controller as a DT device.
index 26d95f178f794c4dc29dde3c5223a77cc63c358c..dc743e113dec6f41a69ae6490f17aa5ca41c7708 100644 (file)
@@ -652,6 +652,8 @@ int ravb_ofdata_to_platdata(struct udevice *dev)
 static const struct udevice_id ravb_ids[] = {
        { .compatible = "renesas,etheravb-r8a7795" },
        { .compatible = "renesas,etheravb-r8a7796" },
+       { .compatible = "renesas,etheravb-r8a77970" },
+       { .compatible = "renesas,etheravb-r8a77995" },
        { .compatible = "renesas,etheravb-rcar-gen3" },
        { }
 };
index 016ed385299089ab5b59287241a85a8a40b42151..7aff3bef1c4340adeedf9d30b9692b2b922fab6c 100644 (file)
@@ -28,4 +28,26 @@ config PINCTRL_PFC_R8A7796
          the GPIO definitions and pin control functions for each available
          multiplex function.
 
+config PINCTRL_PFC_R8A77970
+       bool "Renesas RCar Gen3 R8A77970 pin control driver"
+       def_bool y if R8A77970
+       depends on PINCTRL_PFC
+       help
+         Support pin multiplexing control on Renesas RCar Gen3 R8A77970 SoCs.
+
+         The driver is controlled by a device tree node which contains both
+         the GPIO definitions and pin control functions for each available
+         multiplex function.
+
+config PINCTRL_PFC_R8A77995
+       bool "Renesas RCar Gen3 R8A77995 pin control driver"
+       def_bool y if R8A77995
+       depends on PINCTRL_PFC
+       help
+         Support pin multiplexing control on Renesas RCar Gen3 R8A77995 SoCs.
+
+         The driver is controlled by a device tree node which contains both
+         the GPIO definitions and pin control functions for each available
+         multiplex function.
+
 endif
index ebf80acd71d69fce46b481bde6160570d8375712..8a270721ff77e340a66757e1b631800c610fc81c 100644 (file)
@@ -1,3 +1,5 @@
 obj-$(CONFIG_PINCTRL_PFC) += pfc.o
 obj-$(CONFIG_PINCTRL_PFC_R8A7795) += pfc-r8a7795.o
 obj-$(CONFIG_PINCTRL_PFC_R8A7796) += pfc-r8a7796.o
+obj-$(CONFIG_PINCTRL_PFC_R8A77970) += pfc-r8a77970.o
+obj-$(CONFIG_PINCTRL_PFC_R8A77995) += pfc-r8a77995.o
diff --git a/drivers/pinctrl/renesas/pfc-r8a77970.c b/drivers/pinctrl/renesas/pfc-r8a77970.c
new file mode 100644 (file)
index 0000000..2646515
--- /dev/null
@@ -0,0 +1,2585 @@
+/*
+ * R8A77970 processor support - PFC hardware block.
+ *
+ * Copyright (C) 2016 Renesas Electronics Corp.
+ *
+ * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+ *
+ * R-Car Gen3 processor support - PFC hardware block.
+ *
+ * Copyright (C) 2015  Renesas Electronics Corporation
+ *
+ * SPDX-License-Identifier:    GPL-2.0
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <dm/pinctrl.h>
+#include <linux/kernel.h>
+
+#include "sh_pfc.h"
+
+#define CPU_ALL_PORT(fn, sfx)                                          \
+       PORT_GP_CFG_22(0, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH),      \
+       PORT_GP_CFG_28(1, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH),      \
+       PORT_GP_CFG_17(2, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH),      \
+       PORT_GP_CFG_17(3, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH |      \
+                                  SH_PFC_PIN_CFG_IO_VOLTAGE),          \
+       PORT_GP_CFG_6(4, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH),       \
+       PORT_GP_CFG_15(5, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH)
+/*
+ * F_() : just information
+ * FM() : macro for FN_xxx / xxx_MARK
+ */
+
+/* GPSR0 */
+#define GPSR0_21       F_(DU_EXODDF_DU_ODDF_DISP_CDE,  IP2_23_20)
+#define GPSR0_20       F_(DU_EXVSYNC_DU_VSYNC,         IP2_19_16)
+#define GPSR0_19       F_(DU_EXHSYNC_DU_HSYNC,         IP2_15_12)
+#define GPSR0_18       F_(DU_DOTCLKOUT,                IP2_11_8)
+#define GPSR0_17       F_(DU_DB7,                      IP2_7_4)
+#define GPSR0_16       F_(DU_DB6,                      IP2_3_0)
+#define GPSR0_15       F_(DU_DB5,                      IP1_31_28)
+#define GPSR0_14       F_(DU_DB4,                      IP1_27_24)
+#define GPSR0_13       F_(DU_DB3,                      IP1_23_20)
+#define GPSR0_12       F_(DU_DB2,                      IP1_19_16)
+#define GPSR0_11       F_(DU_DG7,                      IP1_15_12)
+#define GPSR0_10       F_(DU_DG6,                      IP1_11_8)
+#define GPSR0_9                F_(DU_DG5,                      IP1_7_4)
+#define GPSR0_8                F_(DU_DG4,                      IP1_3_0)
+#define GPSR0_7                F_(DU_DG3,                      IP0_31_28)
+#define GPSR0_6                F_(DU_DG2,                      IP0_27_24)
+#define GPSR0_5                F_(DU_DR7,                      IP0_23_20)
+#define GPSR0_4                F_(DU_DR6,                      IP0_19_16)
+#define GPSR0_3                F_(DU_DR5,                      IP0_15_12)
+#define GPSR0_2                F_(DU_DR4,                      IP0_11_8)
+#define GPSR0_1                F_(DU_DR3,                      IP0_7_4)
+#define GPSR0_0                F_(DU_DR2,                      IP0_3_0)
+
+/* GPSR1 */
+#define GPSR1_27       F_(DIGRF_CLKOUT,        IP8_27_24)
+#define GPSR1_26       F_(DIGRF_CLKIN,         IP8_23_20)
+#define GPSR1_25       F_(CANFD_CLK_A,         IP8_19_16)
+#define GPSR1_24       F_(CANFD1_RX,           IP8_15_12)
+#define GPSR1_23       F_(CANFD1_TX,           IP8_11_8)
+#define GPSR1_22       F_(CANFD0_RX_A,         IP8_7_4)
+#define GPSR1_21       F_(CANFD0_TX_A,         IP8_3_0)
+#define GPSR1_20       F_(AVB0_AVTP_CAPTURE,   IP7_31_28)
+#define GPSR1_19       FM(AVB0_AVTP_MATCH)
+#define GPSR1_18       FM(AVB0_LINK)
+#define GPSR1_17       FM(AVB0_PHY_INT)
+#define GPSR1_16       FM(AVB0_MAGIC)
+#define GPSR1_15       FM(AVB0_MDC)
+#define GPSR1_14       FM(AVB0_MDIO)
+#define GPSR1_13       FM(AVB0_TXCREFCLK)
+#define GPSR1_12       FM(AVB0_TD3)
+#define GPSR1_11       FM(AVB0_TD2)
+#define GPSR1_10       FM(AVB0_TD1)
+#define GPSR1_9                FM(AVB0_TD0)
+#define GPSR1_8                FM(AVB0_TXC)
+#define GPSR1_7                FM(AVB0_TX_CTL)
+#define GPSR1_6                FM(AVB0_RD3)
+#define GPSR1_5                FM(AVB0_RD2)
+#define GPSR1_4                FM(AVB0_RD1)
+#define GPSR1_3                FM(AVB0_RD0)
+#define GPSR1_2                FM(AVB0_RXC)
+#define GPSR1_1                FM(AVB0_RX_CTL)
+#define GPSR1_0                F_(IRQ0,                IP2_27_24)
+
+/* GPSR2 */
+#define GPSR2_16       F_(VI0_FIELD,           IP4_31_28)
+#define GPSR2_15       F_(VI0_DATA11,          IP4_27_24)
+#define GPSR2_14       F_(VI0_DATA10,          IP4_23_20)
+#define GPSR2_13       F_(VI0_DATA9,           IP4_19_16)
+#define GPSR2_12       F_(VI0_DATA8,           IP4_15_12)
+#define GPSR2_11       F_(VI0_DATA7,           IP4_11_8)
+#define GPSR2_10       F_(VI0_DATA6,           IP4_7_4)
+#define GPSR2_9                F_(VI0_DATA5,           IP4_3_0)
+#define GPSR2_8                F_(VI0_DATA4,           IP3_31_28)
+#define GPSR2_7                F_(VI0_DATA3,           IP3_27_24)
+#define GPSR2_6                F_(VI0_DATA2,           IP3_23_20)
+#define GPSR2_5                F_(VI0_DATA1,           IP3_19_16)
+#define GPSR2_4                F_(VI0_DATA0,           IP3_15_12)
+#define GPSR2_3                F_(VI0_VSYNC_N,         IP3_11_8)
+#define GPSR2_2                F_(VI0_HSYNC_N,         IP3_7_4)
+#define GPSR2_1                F_(VI0_CLKENB,          IP3_3_0)
+#define GPSR2_0                F_(VI0_CLK,             IP2_31_28)
+
+/* GPSR3 */
+#define GPSR3_16       F_(VI1_FIELD,           IP7_3_0)
+#define GPSR3_15       F_(VI1_DATA11,          IP6_31_28)
+#define GPSR3_14       F_(VI1_DATA10,          IP6_27_24)
+#define GPSR3_13       F_(VI1_DATA9,           IP6_23_20)
+#define GPSR3_12       F_(VI1_DATA8,           IP6_19_16)
+#define GPSR3_11       F_(VI1_DATA7,           IP6_15_12)
+#define GPSR3_10       F_(VI1_DATA6,           IP6_11_8)
+#define GPSR3_9                F_(VI1_DATA5,           IP6_7_4)
+#define GPSR3_8                F_(VI1_DATA4,           IP6_3_0)
+#define GPSR3_7                F_(VI1_DATA3,           IP5_31_28)
+#define GPSR3_6                F_(VI1_DATA2,           IP5_27_24)
+#define GPSR3_5                F_(VI1_DATA1,           IP5_23_20)
+#define GPSR3_4                F_(VI1_DATA0,           IP5_19_16)
+#define GPSR3_3                F_(VI1_VSYNC_N,         IP5_15_12)
+#define GPSR3_2                F_(VI1_HSYNC_N,         IP5_11_8)
+#define GPSR3_1                F_(VI1_CLKENB,          IP5_7_4)
+#define GPSR3_0                F_(VI1_CLK,             IP5_3_0)
+
+/* GPSR4 */
+#define GPSR4_5                F_(SDA2,                IP7_27_24)
+#define GPSR4_4                F_(SCL2,                IP7_23_20)
+#define GPSR4_3                F_(SDA1,                IP7_19_16)
+#define GPSR4_2                F_(SCL1,                IP7_15_12)
+#define GPSR4_1                F_(SDA0,                IP7_11_8)
+#define GPSR4_0                F_(SCL0,                IP7_7_4)
+
+/* GPSR5 */
+#define GPSR5_14       FM(RPC_INT_N)
+#define GPSR5_13       FM(RPC_WP_N)
+#define GPSR5_12       FM(RPC_RESET_N)
+#define GPSR5_11       FM(QSPI1_SSL)
+#define GPSR5_10       FM(QSPI1_IO3)
+#define GPSR5_9                FM(QSPI1_IO2)
+#define GPSR5_8                FM(QSPI1_MISO_IO1)
+#define GPSR5_7                FM(QSPI1_MOSI_IO0)
+#define GPSR5_6                FM(QSPI1_SPCLK)
+#define GPSR5_5                FM(QSPI0_SSL)
+#define GPSR5_4                FM(QSPI0_IO3)
+#define GPSR5_3                FM(QSPI0_IO2)
+#define GPSR5_2                FM(QSPI0_MISO_IO1)
+#define GPSR5_1                FM(QSPI0_MOSI_IO0)
+#define GPSR5_0                FM(QSPI0_SPCLK)
+
+
+/* IPSRx */            /* 0 */                         /* 1 */                 /* 2 */         /* 3 */         /* 4 */                 /* 5 */         /* 6 */         /* 7 */         /* 8 */         /* 9 */         /* A */         /* B */         /* C */         /* D */         /* E */         /* F */
+#define IP0_3_0                FM(DU_DR2)                      FM(HSCK0)               F_(0, 0)        FM(A0)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP0_7_4                FM(DU_DR3)                      FM(HRTS0_N)             F_(0, 0)        FM(A1)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP0_11_8       FM(DU_DR4)                      FM(HCTS0_N)             F_(0, 0)        FM(A2)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP0_15_12      FM(DU_DR5)                      FM(HTX0)                F_(0, 0)        FM(A3)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP0_19_16      FM(DU_DR6)                      FM(MSIOF3_RXD)          F_(0, 0)        FM(A4)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP0_23_20      FM(DU_DR7)                      FM(MSIOF3_TXD)          F_(0, 0)        FM(A5)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP0_27_24      FM(DU_DG2)                      FM(MSIOF3_SS1)          F_(0, 0)        FM(A6)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP0_31_28      FM(DU_DG3)                      FM(MSIOF3_SS2)          F_(0, 0)        FM(A7)          FM(PWMFSW0)             F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP1_3_0                FM(DU_DG4)                      F_(0, 0)                F_(0, 0)        FM(A8)          FM(FSO_CFE_0_N_A)       F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP1_7_4                FM(DU_DG5)                      F_(0, 0)                F_(0, 0)        FM(A9)          FM(FSO_CFE_1_N_A)       F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP1_11_8       FM(DU_DG6)                      F_(0, 0)                F_(0, 0)        FM(A10)         FM(FSO_TOE_N_A)         F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP1_15_12      FM(DU_DG7)                      F_(0, 0)                F_(0, 0)        FM(A11)         FM(IRQ1)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP1_19_16      FM(DU_DB2)                      F_(0, 0)                F_(0, 0)        FM(A12)         FM(IRQ2)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP1_23_20      FM(DU_DB3)                      F_(0, 0)                F_(0, 0)        FM(A13)         FM(FXR_CLKOUT1)         F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP1_27_24      FM(DU_DB4)                      F_(0, 0)                F_(0, 0)        FM(A14)         FM(FXR_CLKOUT2)         F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP1_31_28      FM(DU_DB5)                      F_(0, 0)                F_(0, 0)        FM(A15)         FM(FXR_TXENA_N)         F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP2_3_0                FM(DU_DB6)                      F_(0, 0)                F_(0, 0)        FM(A16)         FM(FXR_TXENB_N)         F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP2_7_4                FM(DU_DB7)                      F_(0, 0)                F_(0, 0)        FM(A17)         FM(STPWT_EXTFXR)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP2_11_8       FM(DU_DOTCLKOUT)                FM(SCIF_CLK_A)          F_(0, 0)        FM(A18)         F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP2_15_12      FM(DU_EXHSYNC_DU_HSYNC)         FM(HRX0)                F_(0, 0)        FM(A19)         FM(IRQ3)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP2_19_16      FM(DU_EXVSYNC_DU_VSYNC)         FM(MSIOF3_SCK)          F_(0, 0)        FM(A20)         F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP2_23_20      FM(DU_EXODDF_DU_ODDF_DISP_CDE)  FM(MSIOF3_SYNC)         F_(0, 0)        FM(A21)         F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP2_27_24      FM(IRQ0)                        FM(CC5_OSCOUT)          F_(0, 0)        F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP2_31_28      FM(VI0_CLK)                     FM(MSIOF2_SCK)          FM(SCK3)        F_(0, 0)        FM(HSCK3)               F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP3_3_0                FM(VI0_CLKENB)                  FM(MSIOF2_RXD)          FM(RX3)         FM(RD_WR_N)     FM(HCTS3_N)             F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP3_7_4                FM(VI0_HSYNC_N)                 FM(MSIOF2_TXD)          FM(TX3)         F_(0, 0)        FM(HRTS3_N)             F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP3_11_8       FM(VI0_VSYNC_N)                 FM(MSIOF2_SYNC)         FM(CTS3_N)      F_(0, 0)        FM(HTX3)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP3_15_12      FM(VI0_DATA0)                   FM(MSIOF2_SS1)          FM(RTS3_N_TANS) F_(0, 0)        FM(HRX3)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP3_19_16      FM(VI0_DATA1)                   FM(MSIOF2_SS2)          FM(SCK1)        F_(0, 0)        FM(SPEEDIN_A)           F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP3_23_20      FM(VI0_DATA2)                   FM(AVB0_AVTP_PPS)       FM(SDA3_A)      F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP3_27_24      FM(VI0_DATA3)                   FM(HSCK1)               FM(SCL3_A)      F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP3_31_28      FM(VI0_DATA4)                   FM(HRTS1_N)             FM(RX1_A)       F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP4_3_0                FM(VI0_DATA5)                   FM(HCTS1_N)             FM(TX1_A)       F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP4_7_4                FM(VI0_DATA6)                   FM(HTX1)                FM(CTS1_N)      F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP4_11_8       FM(VI0_DATA7)                   FM(HRX1)                FM(RTS1_N_TANS) F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP4_15_12      FM(VI0_DATA8)                   FM(HSCK2)               FM(PWM0_A)      FM(A22)         F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP4_19_16      FM(VI0_DATA9)                   FM(HCTS2_N)             FM(PWM1_A)      FM(A23)         FM(FSO_CFE_0_N_B)       F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP4_23_20      FM(VI0_DATA10)                  FM(HRTS2_N)             FM(PWM2_A)      FM(A24)         FM(FSO_CFE_1_N_B)       F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP4_27_24      FM(VI0_DATA11)                  FM(HTX2)                FM(PWM3_A)      FM(A25)         FM(FSO_TOE_N_B)         F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP4_31_28      FM(VI0_FIELD)                   FM(HRX2)                FM(PWM4_A)      FM(CS1_N_A26)   FM(FSCLKST2_N_A)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP5_3_0                FM(VI1_CLK)                     FM(MSIOF1_RXD)          F_(0, 0)        FM(CS0_N)       F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP5_7_4                FM(VI1_CLKENB)                  FM(MSIOF1_TXD)          F_(0, 0)        FM(D0)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP5_11_8       FM(VI1_HSYNC_N)                 FM(MSIOF1_SCK)          F_(0, 0)        FM(D1)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP5_15_12      FM(VI1_VSYNC_N)                 FM(MSIOF1_SYNC)         F_(0, 0)        FM(D2)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP5_19_16      FM(VI1_DATA0)                   FM(MSIOF1_SS1)          F_(0, 0)        FM(D3)          F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP5_23_20      FM(VI1_DATA1)                   FM(MSIOF1_SS2)          F_(0, 0)        FM(D4)          FM(MMC_CMD)             F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP5_27_24      FM(VI1_DATA2)                   FM(CANFD0_TX_B)         F_(0, 0)        FM(D5)          FM(MMC_D0)              F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP5_31_28      FM(VI1_DATA3)                   FM(CANFD0_RX_B)         F_(0, 0)        FM(D6)          FM(MMC_D1)              F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP6_3_0                FM(VI1_DATA4)                   FM(CANFD_CLK_B)         F_(0, 0)        FM(D7)          FM(MMC_D2)              F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP6_7_4                FM(VI1_DATA5)                   F_(0,0)                 FM(SCK4)        FM(D8)          FM(MMC_D3)              F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP6_11_8       FM(VI1_DATA6)                   F_(0,0)                 FM(RX4)         FM(D9)          FM(MMC_CLK)             F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP6_15_12      FM(VI1_DATA7)                   F_(0,0)                 FM(TX4)         FM(D10)         FM(MMC_D4)              F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP6_19_16      FM(VI1_DATA8)                   F_(0,0)                 FM(CTS4_N)      FM(D11)         FM(MMC_D5)              F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP6_23_20      FM(VI1_DATA9)                   F_(0,0)                 FM(RTS4_N_TANS) FM(D12)         FM(MMC_D6)              FM(SCL3_B)      F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP6_27_24      FM(VI1_DATA10)                  F_(0,0)                 F_(0, 0)        FM(D13)         FM(MMC_D7)              FM(SDA3_B)      F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP6_31_28      FM(VI1_DATA11)                  FM(SCL4)                FM(IRQ4)        FM(D14)         FM(MMC_WP)              F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP7_3_0                FM(VI1_FIELD)                   FM(SDA4)                FM(IRQ5)        FM(D15)         FM(MMC_CD)              F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP7_7_4                FM(SCL0)                        FM(DU_DR0)              FM(TPU0TO0)     FM(CLKOUT)      F_(0, 0)                FM(MSIOF0_RXD)  F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP7_11_8       FM(SDA0)                        FM(DU_DR1)              FM(TPU0TO1)     FM(BS_N)        FM(SCK0)                FM(MSIOF0_TXD)  F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP7_15_12      FM(SCL1)                        FM(DU_DG0)              FM(TPU0TO2)     FM(RD_N)        FM(CTS0_N)              FM(MSIOF0_SCK)  F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP7_19_16      FM(SDA1)                        FM(DU_DG1)              FM(TPU0TO3)     FM(WE0_N)       FM(RTS0_N_TANS)         FM(MSIOF0_SYNC) F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP7_23_20      FM(SCL2)                        FM(DU_DB0)              FM(TCLK1_A)     FM(WE1_N)       FM(RX0)                 FM(MSIOF0_SS1)  F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP7_27_24      FM(SDA2)                        FM(DU_DB1)              FM(TCLK2_A)     FM(EX_WAIT0)    FM(TX0)                 FM(MSIOF0_SS2)  F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP7_31_28      FM(AVB0_AVTP_CAPTURE)           F_(0, 0)                F_(0, 0)        F_(0, 0)        FM(FSCLKST2_N_B)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP8_3_0                FM(CANFD0_TX_A)                 FM(FXR_TXDA)            FM(PWM0_B)      FM(DU_DISP)     FM(FSCLKST2_N_C)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP8_7_4                FM(CANFD0_RX_A)                 FM(RXDA_EXTFXR)         FM(PWM1_B)      FM(DU_CDE)      F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP8_11_8       FM(CANFD1_TX)                   FM(FXR_TXDB)            FM(PWM2_B)      FM(TCLK1_B)     FM(TX1_B)               F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP8_15_12      FM(CANFD1_RX)                   FM(RXDB_EXTFXR)         FM(PWM3_B)      FM(TCLK2_B)     FM(RX1_B)               F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP8_19_16      FM(CANFD_CLK_A)                 FM(CLK_EXTFXR)          FM(PWM4_B)      FM(SPEEDIN_B)   FM(SCIF_CLK_B)          F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP8_23_20      FM(DIGRF_CLKIN)                 FM(DIGRF_CLKEN_IN)      F_(0, 0)        F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP8_27_24      FM(DIGRF_CLKOUT)                FM(DIGRF_CLKEN_OUT)     F_(0, 0)        F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+#define IP8_31_28      F_(0, 0)                        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)        F_(0, 0)
+
+#define PINMUX_GPSR    \
+\
+               GPSR1_27 \
+               GPSR1_26 \
+               GPSR1_25 \
+               GPSR1_24 \
+               GPSR1_23 \
+               GPSR1_22 \
+GPSR0_21       GPSR1_21 \
+GPSR0_20       GPSR1_20 \
+GPSR0_19       GPSR1_19 \
+GPSR0_18       GPSR1_18 \
+GPSR0_17       GPSR1_17 \
+GPSR0_16       GPSR1_16        GPSR2_16        GPSR3_16 \
+GPSR0_15       GPSR1_15        GPSR2_15        GPSR3_15 \
+GPSR0_14       GPSR1_14        GPSR2_14        GPSR3_14                        GPSR5_14 \
+GPSR0_13       GPSR1_13        GPSR2_13        GPSR3_13                        GPSR5_13 \
+GPSR0_12       GPSR1_12        GPSR2_12        GPSR3_12                        GPSR5_12 \
+GPSR0_11       GPSR1_11        GPSR2_11        GPSR3_11                        GPSR5_11 \
+GPSR0_10       GPSR1_10        GPSR2_10        GPSR3_10                        GPSR5_10 \
+GPSR0_9                GPSR1_9         GPSR2_9         GPSR3_9                         GPSR5_9 \
+GPSR0_8                GPSR1_8         GPSR2_8         GPSR3_8                         GPSR5_8 \
+GPSR0_7                GPSR1_7         GPSR2_7         GPSR3_7                         GPSR5_7 \
+GPSR0_6                GPSR1_6         GPSR2_6         GPSR3_6                         GPSR5_6 \
+GPSR0_5                GPSR1_5         GPSR2_5         GPSR3_5         GPSR4_5         GPSR5_5 \
+GPSR0_4                GPSR1_4         GPSR2_4         GPSR3_4         GPSR4_4         GPSR5_4 \
+GPSR0_3                GPSR1_3         GPSR2_3         GPSR3_3         GPSR4_3         GPSR5_3 \
+GPSR0_2                GPSR1_2         GPSR2_2         GPSR3_2         GPSR4_2         GPSR5_2 \
+GPSR0_1                GPSR1_1         GPSR2_1         GPSR3_1         GPSR4_1         GPSR5_1 \
+GPSR0_0                GPSR1_0         GPSR2_0         GPSR3_0         GPSR4_0         GPSR5_0
+
+#define PINMUX_IPSR    \
+\
+FM(IP0_3_0)    IP0_3_0         FM(IP1_3_0)     IP1_3_0         FM(IP2_3_0)     IP2_3_0         FM(IP3_3_0)     IP3_3_0 \
+FM(IP0_7_4)    IP0_7_4         FM(IP1_7_4)     IP1_7_4         FM(IP2_7_4)     IP2_7_4         FM(IP3_7_4)     IP3_7_4 \
+FM(IP0_11_8)   IP0_11_8        FM(IP1_11_8)    IP1_11_8        FM(IP2_11_8)    IP2_11_8        FM(IP3_11_8)    IP3_11_8 \
+FM(IP0_15_12)  IP0_15_12       FM(IP1_15_12)   IP1_15_12       FM(IP2_15_12)   IP2_15_12       FM(IP3_15_12)   IP3_15_12 \
+FM(IP0_19_16)  IP0_19_16       FM(IP1_19_16)   IP1_19_16       FM(IP2_19_16)   IP2_19_16       FM(IP3_19_16)   IP3_19_16 \
+FM(IP0_23_20)  IP0_23_20       FM(IP1_23_20)   IP1_23_20       FM(IP2_23_20)   IP2_23_20       FM(IP3_23_20)   IP3_23_20 \
+FM(IP0_27_24)  IP0_27_24       FM(IP1_27_24)   IP1_27_24       FM(IP2_27_24)   IP2_27_24       FM(IP3_27_24)   IP3_27_24 \
+FM(IP0_31_28)  IP0_31_28       FM(IP1_31_28)   IP1_31_28       FM(IP2_31_28)   IP2_31_28       FM(IP3_31_28)   IP3_31_28 \
+\
+FM(IP4_3_0)    IP4_3_0         FM(IP5_3_0)     IP5_3_0         FM(IP6_3_0)     IP6_3_0         FM(IP7_3_0)     IP7_3_0 \
+FM(IP4_7_4)    IP4_7_4         FM(IP5_7_4)     IP5_7_4         FM(IP6_7_4)     IP6_7_4         FM(IP7_7_4)     IP7_7_4 \
+FM(IP4_11_8)   IP4_11_8        FM(IP5_11_8)    IP5_11_8        FM(IP6_11_8)    IP6_11_8        FM(IP7_11_8)    IP7_11_8 \
+FM(IP4_15_12)  IP4_15_12       FM(IP5_15_12)   IP5_15_12       FM(IP6_15_12)   IP6_15_12       FM(IP7_15_12)   IP7_15_12 \
+FM(IP4_19_16)  IP4_19_16       FM(IP5_19_16)   IP5_19_16       FM(IP6_19_16)   IP6_19_16       FM(IP7_19_16)   IP7_19_16 \
+FM(IP4_23_20)  IP4_23_20       FM(IP5_23_20)   IP5_23_20       FM(IP6_23_20)   IP6_23_20       FM(IP7_23_20)   IP7_23_20 \
+FM(IP4_27_24)  IP4_27_24       FM(IP5_27_24)   IP5_27_24       FM(IP6_27_24)   IP6_27_24       FM(IP7_27_24)   IP7_27_24 \
+FM(IP4_31_28)  IP4_31_28       FM(IP5_31_28)   IP5_31_28       FM(IP6_31_28)   IP6_31_28       FM(IP7_31_28)   IP7_31_28 \
+\
+FM(IP8_3_0)    IP8_3_0 \
+FM(IP8_7_4)    IP8_7_4 \
+FM(IP8_11_8)   IP8_11_8 \
+FM(IP8_15_12)  IP8_15_12 \
+FM(IP8_19_16)  IP8_19_16 \
+FM(IP8_23_20)  IP8_23_20 \
+FM(IP8_27_24)  IP8_27_24 \
+FM(IP8_31_28)  IP8_31_28
+
+/*
+                       Set Value = H'0                 Set Value = H'1
+Register       Function        Pin                     Function        Pin
+------------------------------------------------------------
+sel_i2c3       SDA3_A          VI0_DATA2       SDA3_B          VI1_DATA10
+               SCL3_A          VI0_DATA3       SCL3_B          VI1_DATA9
+sel_hscif0     HSCIF0_A        SCIF_CLK        HSCIF0_B        SCIF_CLK
+sel_scif1      SCIF1_A         RX1             SCIF1_B         TX1
+               SCIF1_A         TX1             SCIF1_B         RX1
+sel_canfd0     CANFD0_A        CANFD0_TX       CANFD0_B        CANFD0_TX
+               CANFD0_A        CANFD0_RX       CANFD0_B        CANFD0_RX
+               CANFD0_A        CANFD_CLK       CANFD0_B        CANFD_CLK
+sel_pwm4       PWM4_A          PWM4            PWM4_B          PWM4
+sel_pwm3       PWM3_A          PWM3            PWM3_B          PWM3
+sel_pwm2       PWM2_A          PWM2            PWM2_B          PWM2
+sel_pwm1       PWM1_A          PWM1            PWM1_B          PWM1
+sel_pwm0       PWM0_A          PWM0            PWM0_B          PWM0
+sel_rfso       RFSO_A          FSO_CFE_0_N     RFSO_B          FSO_CFE_0_N
+               RFSO_A          FSO_CFE_1_N     RFSO_B          FSO_CFE_1_N
+               RFSO_A          FSO_TOE_N       RFSO_B          FSO_TOE_N
+sel_rsp                RSP_A           SPEEDIN         RSP_B           SPEEDIN
+sel_tmu                TMU_A           TCLK1           TMU_B           TCLK1
+               TMU_A           TCLK2           TMU_B           TCLK2
+*/
+/* MOD_SEL0 */         /* 0 */                 /* 1 */                 /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */
+#define MOD_SEL0_11    FM(SEL_I2C3_0)          FM(SEL_I2C3_1)
+#define MOD_SEL0_10    FM(SEL_HSCIF0_0)        FM(SEL_HSCIF0_1)
+#define MOD_SEL0_9     FM(SEL_SCIF1_0)         FM(SEL_SCIF1_1)
+#define MOD_SEL0_8     FM(SEL_CANFD0_0)        FM(SEL_CANFD0_1)
+#define MOD_SEL0_7     FM(SEL_PWM4_0)          FM(SEL_PWM4_1)
+#define MOD_SEL0_6     FM(SEL_PWM3_0)          FM(SEL_PWM3_1)
+#define MOD_SEL0_5     FM(SEL_PWM2_0)          FM(SEL_PWM2_1)
+#define MOD_SEL0_4     FM(SEL_PWM1_0)          FM(SEL_PWM1_1)
+#define MOD_SEL0_3     FM(SEL_PWM0_0)          FM(SEL_PWM0_1)
+#define MOD_SEL0_2     FM(SEL_RFSO_0)          FM(SEL_RFSO_1)
+#define MOD_SEL0_1     FM(SEL_RSP_0)           FM(SEL_RSP_1)
+#define MOD_SEL0_0     FM(SEL_TMU_0)           FM(SEL_TMU_1)
+
+#define PINMUX_MOD_SELS \
+\
+MOD_SEL0_11 \
+MOD_SEL0_10 \
+MOD_SEL0_9 \
+MOD_SEL0_8 \
+MOD_SEL0_7 \
+MOD_SEL0_6 \
+MOD_SEL0_5 \
+MOD_SEL0_4 \
+MOD_SEL0_3 \
+MOD_SEL0_2 \
+MOD_SEL0_1 \
+MOD_SEL0_0
+
+enum {
+       PINMUX_RESERVED = 0,
+
+       PINMUX_DATA_BEGIN,
+       GP_ALL(DATA),
+       PINMUX_DATA_END,
+
+#define F_(x, y)
+#define FM(x)   FN_##x,
+       PINMUX_FUNCTION_BEGIN,
+       GP_ALL(FN),
+       PINMUX_GPSR
+       PINMUX_IPSR
+       PINMUX_MOD_SELS
+       PINMUX_FUNCTION_END,
+#undef F_
+#undef FM
+
+#define F_(x, y)
+#define FM(x)  x##_MARK,
+       PINMUX_MARK_BEGIN,
+       PINMUX_GPSR
+       PINMUX_IPSR
+       PINMUX_MOD_SELS
+       PINMUX_MARK_END,
+#undef F_
+#undef FM
+};
+
+static const u16 pinmux_data[] = {
+       PINMUX_DATA_GP_ALL(),
+
+       PINMUX_SINGLE(AVB0_RX_CTL),
+       PINMUX_SINGLE(AVB0_RXC),
+       PINMUX_SINGLE(AVB0_RD0),
+       PINMUX_SINGLE(AVB0_RD1),
+       PINMUX_SINGLE(AVB0_RD2),
+       PINMUX_SINGLE(AVB0_RD3),
+       PINMUX_SINGLE(AVB0_TX_CTL),
+       PINMUX_SINGLE(AVB0_TXC),
+       PINMUX_SINGLE(AVB0_TD0),
+       PINMUX_SINGLE(AVB0_TD1),
+       PINMUX_SINGLE(AVB0_TD2),
+       PINMUX_SINGLE(AVB0_TD3),
+       PINMUX_SINGLE(AVB0_TXCREFCLK),
+       PINMUX_SINGLE(AVB0_MDIO),
+       PINMUX_SINGLE(AVB0_MDC),
+       PINMUX_SINGLE(AVB0_MAGIC),
+       PINMUX_SINGLE(AVB0_PHY_INT),
+       PINMUX_SINGLE(AVB0_LINK),
+       PINMUX_SINGLE(AVB0_AVTP_MATCH),
+
+       PINMUX_SINGLE(QSPI0_SPCLK),
+       PINMUX_SINGLE(QSPI0_MOSI_IO0),
+       PINMUX_SINGLE(QSPI0_MISO_IO1),
+       PINMUX_SINGLE(QSPI0_IO2),
+       PINMUX_SINGLE(QSPI0_IO3),
+       PINMUX_SINGLE(QSPI0_SSL),
+       PINMUX_SINGLE(QSPI1_SPCLK),
+       PINMUX_SINGLE(QSPI1_MOSI_IO0),
+       PINMUX_SINGLE(QSPI1_MISO_IO1),
+       PINMUX_SINGLE(QSPI1_IO2),
+       PINMUX_SINGLE(QSPI1_IO3),
+       PINMUX_SINGLE(QSPI1_SSL),
+       PINMUX_SINGLE(RPC_RESET_N),
+       PINMUX_SINGLE(RPC_WP_N),
+       PINMUX_SINGLE(RPC_INT_N),
+
+       /* IPSR0 */
+       PINMUX_IPSR_GPSR(IP0_3_0,       DU_DR2),
+       PINMUX_IPSR_GPSR(IP0_3_0,       HSCK0),
+       PINMUX_IPSR_GPSR(IP0_3_0,       A0),
+
+       PINMUX_IPSR_GPSR(IP0_7_4,       DU_DR3),
+       PINMUX_IPSR_GPSR(IP0_7_4,       HRTS0_N),
+       PINMUX_IPSR_GPSR(IP0_7_4,       A1),
+
+       PINMUX_IPSR_GPSR(IP0_11_8,      DU_DR4),
+       PINMUX_IPSR_GPSR(IP0_11_8,      HCTS0_N),
+       PINMUX_IPSR_GPSR(IP0_11_8,      A2),
+
+       PINMUX_IPSR_GPSR(IP0_15_12,     DU_DR5),
+       PINMUX_IPSR_GPSR(IP0_15_12,     HTX0),
+       PINMUX_IPSR_GPSR(IP0_15_12,     A3),
+
+       PINMUX_IPSR_GPSR(IP0_19_16,     DU_DR6),
+       PINMUX_IPSR_GPSR(IP0_19_16,     MSIOF3_RXD),
+       PINMUX_IPSR_GPSR(IP0_19_16,     A4),
+
+       PINMUX_IPSR_GPSR(IP0_23_20,     DU_DR7),
+       PINMUX_IPSR_GPSR(IP0_23_20,     MSIOF3_TXD),
+       PINMUX_IPSR_GPSR(IP0_23_20,     A5),
+
+       PINMUX_IPSR_GPSR(IP0_27_24,     DU_DG2),
+       PINMUX_IPSR_GPSR(IP0_27_24,     MSIOF3_SS1),
+       PINMUX_IPSR_GPSR(IP0_27_24,     A6),
+
+       PINMUX_IPSR_GPSR(IP0_31_28,     DU_DG3),
+       PINMUX_IPSR_GPSR(IP0_31_28,     MSIOF3_SS2),
+       PINMUX_IPSR_GPSR(IP0_31_28,     A7),
+       PINMUX_IPSR_GPSR(IP0_31_28,     PWMFSW0),
+
+       /* IPSR1 */
+       PINMUX_IPSR_GPSR(IP1_3_0,       DU_DG4),
+       PINMUX_IPSR_GPSR(IP1_3_0,       A8),
+       PINMUX_IPSR_MSEL(IP1_3_0,       FSO_CFE_0_N_A,  SEL_RFSO_0),
+
+       PINMUX_IPSR_GPSR(IP1_7_4,       DU_DG5),
+       PINMUX_IPSR_GPSR(IP1_7_4,       A9),
+       PINMUX_IPSR_MSEL(IP1_7_4,       FSO_CFE_1_N_A,  SEL_RFSO_0),
+
+       PINMUX_IPSR_GPSR(IP1_11_8,      DU_DG6),
+       PINMUX_IPSR_GPSR(IP1_11_8,      A10),
+       PINMUX_IPSR_MSEL(IP1_11_8,      FSO_TOE_N_A,    SEL_RFSO_0),
+
+       PINMUX_IPSR_GPSR(IP1_15_12,     DU_DG7),
+       PINMUX_IPSR_GPSR(IP1_15_12,     A11),
+       PINMUX_IPSR_GPSR(IP1_15_12,     IRQ1),
+
+       PINMUX_IPSR_GPSR(IP1_19_16,     DU_DB2),
+       PINMUX_IPSR_GPSR(IP1_19_16,     A12),
+       PINMUX_IPSR_GPSR(IP1_19_16,     IRQ2),
+
+       PINMUX_IPSR_GPSR(IP1_23_20,     DU_DB3),
+       PINMUX_IPSR_GPSR(IP1_23_20,     A13),
+       PINMUX_IPSR_GPSR(IP1_23_20,     FXR_CLKOUT1),
+
+       PINMUX_IPSR_GPSR(IP1_27_24,     DU_DB4),
+       PINMUX_IPSR_GPSR(IP1_27_24,     A14),
+       PINMUX_IPSR_GPSR(IP1_27_24,     FXR_CLKOUT2),
+
+       PINMUX_IPSR_GPSR(IP1_31_28,     DU_DB5),
+       PINMUX_IPSR_GPSR(IP1_31_28,     A15),
+       PINMUX_IPSR_GPSR(IP1_31_28,     FXR_TXENA_N),
+
+       /* IPSR2 */
+       PINMUX_IPSR_GPSR(IP2_3_0,       DU_DB6),
+       PINMUX_IPSR_GPSR(IP2_3_0,       A16),
+       PINMUX_IPSR_GPSR(IP2_3_0,       FXR_TXENB_N),
+
+       PINMUX_IPSR_GPSR(IP2_7_4,       DU_DB7),
+       PINMUX_IPSR_GPSR(IP2_7_4,       A17),
+       PINMUX_IPSR_GPSR(IP2_7_4,       STPWT_EXTFXR),
+
+       PINMUX_IPSR_GPSR(IP2_11_8,      DU_DOTCLKOUT),
+       PINMUX_IPSR_MSEL(IP2_11_8,      SCIF_CLK_A,     SEL_HSCIF0_0),
+       PINMUX_IPSR_GPSR(IP2_11_8,      A18),
+
+       PINMUX_IPSR_GPSR(IP2_15_12,     DU_EXHSYNC_DU_HSYNC),
+       PINMUX_IPSR_GPSR(IP2_15_12,     HRX0),
+       PINMUX_IPSR_GPSR(IP2_15_12,     A19),
+       PINMUX_IPSR_GPSR(IP2_15_12,     IRQ3),
+
+       PINMUX_IPSR_GPSR(IP2_19_16,     DU_EXVSYNC_DU_VSYNC),
+       PINMUX_IPSR_GPSR(IP2_19_16,     MSIOF3_SCK),
+       PINMUX_IPSR_GPSR(IP2_19_16,     A20),
+
+       PINMUX_IPSR_GPSR(IP2_23_20,     DU_EXODDF_DU_ODDF_DISP_CDE),
+       PINMUX_IPSR_GPSR(IP2_23_20,     MSIOF3_SYNC),
+       PINMUX_IPSR_GPSR(IP2_23_20,     A21),
+
+       PINMUX_IPSR_GPSR(IP2_27_24,     IRQ0),
+       PINMUX_IPSR_GPSR(IP2_27_24,     CC5_OSCOUT),
+
+       PINMUX_IPSR_GPSR(IP2_31_28,     VI0_CLK),
+       PINMUX_IPSR_GPSR(IP2_31_28,     MSIOF2_SCK),
+       PINMUX_IPSR_GPSR(IP2_31_28,     SCK3),
+       PINMUX_IPSR_GPSR(IP2_31_28,     HSCK3),
+
+       /* IPSR3 */
+       PINMUX_IPSR_GPSR(IP3_3_0,       VI0_CLKENB),
+       PINMUX_IPSR_GPSR(IP3_3_0,       MSIOF2_RXD),
+       PINMUX_IPSR_GPSR(IP3_3_0,       RX3),
+       PINMUX_IPSR_GPSR(IP3_3_0,       RD_WR_N),
+       PINMUX_IPSR_GPSR(IP3_3_0,       HCTS3_N),
+
+       PINMUX_IPSR_GPSR(IP3_7_4,       VI0_HSYNC_N),
+       PINMUX_IPSR_GPSR(IP3_7_4,       MSIOF2_TXD),
+       PINMUX_IPSR_GPSR(IP3_7_4,       TX3),
+       PINMUX_IPSR_GPSR(IP3_7_4,       HRTS3_N),
+
+       PINMUX_IPSR_GPSR(IP3_11_8,      VI0_VSYNC_N),
+       PINMUX_IPSR_GPSR(IP3_11_8,      MSIOF2_SYNC),
+       PINMUX_IPSR_GPSR(IP3_11_8,      CTS3_N),
+       PINMUX_IPSR_GPSR(IP3_11_8,      HTX3),
+
+       PINMUX_IPSR_GPSR(IP3_15_12,     VI0_DATA0),
+       PINMUX_IPSR_GPSR(IP3_15_12,     MSIOF2_SS1),
+       PINMUX_IPSR_GPSR(IP3_15_12,     RTS3_N_TANS),
+       PINMUX_IPSR_GPSR(IP3_15_12,     HRX3),
+
+       PINMUX_IPSR_GPSR(IP3_19_16,     VI0_DATA1),
+       PINMUX_IPSR_GPSR(IP3_19_16,     MSIOF2_SS2),
+       PINMUX_IPSR_GPSR(IP3_19_16,     SCK1),
+       PINMUX_IPSR_MSEL(IP3_19_16,     SPEEDIN_A,      SEL_RSP_1),
+
+       PINMUX_IPSR_GPSR(IP3_23_20,     VI0_DATA2),
+       PINMUX_IPSR_GPSR(IP3_23_20,     AVB0_AVTP_PPS),
+       PINMUX_IPSR_GPSR(IP3_23_20,     SDA3_A),
+
+       PINMUX_IPSR_GPSR(IP3_27_24,     VI0_DATA3),
+       PINMUX_IPSR_GPSR(IP3_27_24,     HSCK1),
+       PINMUX_IPSR_GPSR(IP3_27_24,     SCL3_A),
+
+       PINMUX_IPSR_GPSR(IP3_31_28,     VI0_DATA4),
+       PINMUX_IPSR_GPSR(IP3_31_28,     HRTS1_N),
+       PINMUX_IPSR_MSEL(IP3_31_28,     RX1_A,  SEL_SCIF1_0),
+
+       /* IPSR4 */
+       PINMUX_IPSR_GPSR(IP4_3_0,       VI0_DATA5),
+       PINMUX_IPSR_GPSR(IP4_3_0,       HCTS1_N),
+       PINMUX_IPSR_MSEL(IP4_3_0,       TX1_A,  SEL_SCIF1_0),
+
+       PINMUX_IPSR_GPSR(IP4_7_4,       VI0_DATA6),
+       PINMUX_IPSR_GPSR(IP4_7_4,       HTX1),
+       PINMUX_IPSR_GPSR(IP4_7_4,       CTS1_N),
+
+       PINMUX_IPSR_GPSR(IP4_11_8,      VI0_DATA7),
+       PINMUX_IPSR_GPSR(IP4_11_8,      HRX1),
+       PINMUX_IPSR_GPSR(IP4_11_8,      RTS1_N_TANS),
+
+       PINMUX_IPSR_GPSR(IP4_15_12,     VI0_DATA8),
+       PINMUX_IPSR_GPSR(IP4_15_12,     HSCK2),
+       PINMUX_IPSR_MSEL(IP4_15_12,     PWM0_A, SEL_PWM0_0),
+       PINMUX_IPSR_GPSR(IP4_15_12,     A22),
+
+       PINMUX_IPSR_GPSR(IP4_19_16,     VI0_DATA9),
+       PINMUX_IPSR_GPSR(IP4_19_16,     HCTS2_N),
+       PINMUX_IPSR_MSEL(IP4_19_16,     PWM1_A, SEL_PWM1_0),
+       PINMUX_IPSR_GPSR(IP4_19_16,     A23),
+       PINMUX_IPSR_MSEL(IP4_19_16,     FSO_CFE_0_N_B,  SEL_RFSO_1),
+
+       PINMUX_IPSR_GPSR(IP4_23_20,     VI0_DATA10),
+       PINMUX_IPSR_GPSR(IP4_23_20,     HRTS2_N),
+       PINMUX_IPSR_MSEL(IP4_23_20,     PWM2_A, SEL_PWM2_0),
+       PINMUX_IPSR_GPSR(IP4_23_20,     A24),
+       PINMUX_IPSR_MSEL(IP4_23_20,     FSO_CFE_1_N_B,  SEL_RFSO_1),
+
+       PINMUX_IPSR_GPSR(IP4_27_24,     VI0_DATA11),
+       PINMUX_IPSR_GPSR(IP4_27_24,     HTX2),
+       PINMUX_IPSR_MSEL(IP4_27_24,     PWM3_A, SEL_PWM3_0),
+       PINMUX_IPSR_GPSR(IP4_27_24,     A25),
+       PINMUX_IPSR_MSEL(IP4_27_24,     FSO_TOE_N_B,    SEL_RFSO_1),
+
+       PINMUX_IPSR_GPSR(IP4_31_28,     VI0_FIELD),
+       PINMUX_IPSR_GPSR(IP4_31_28,     HRX2),
+       PINMUX_IPSR_MSEL(IP4_31_28,     PWM4_A, SEL_PWM4_0),
+       PINMUX_IPSR_GPSR(IP4_31_28,     CS1_N_A26),
+       PINMUX_IPSR_GPSR(IP4_31_28,     FSCLKST2_N_A),
+
+       /* IPSR5 */
+       PINMUX_IPSR_GPSR(IP5_3_0,       VI1_CLK),
+       PINMUX_IPSR_GPSR(IP5_3_0,       MSIOF1_RXD),
+       PINMUX_IPSR_GPSR(IP5_3_0,       CS0_N),
+
+       PINMUX_IPSR_GPSR(IP5_7_4,       VI1_CLKENB),
+       PINMUX_IPSR_GPSR(IP5_7_4,       MSIOF1_TXD),
+       PINMUX_IPSR_GPSR(IP5_7_4,       D0),
+
+       PINMUX_IPSR_GPSR(IP5_11_8,      VI1_HSYNC_N),
+       PINMUX_IPSR_GPSR(IP5_11_8,      MSIOF1_SCK),
+       PINMUX_IPSR_GPSR(IP5_11_8,      D1),
+
+       PINMUX_IPSR_GPSR(IP5_15_12,     VI1_VSYNC_N),
+       PINMUX_IPSR_GPSR(IP5_15_12,     MSIOF1_SYNC),
+       PINMUX_IPSR_GPSR(IP5_15_12,     D2),
+
+       PINMUX_IPSR_GPSR(IP5_19_16,     VI1_DATA0),
+       PINMUX_IPSR_GPSR(IP5_19_16,     MSIOF1_SS1),
+       PINMUX_IPSR_GPSR(IP5_19_16,     D3),
+
+       PINMUX_IPSR_GPSR(IP5_23_20,     VI1_DATA1),
+       PINMUX_IPSR_GPSR(IP5_23_20,     MSIOF1_SS2),
+       PINMUX_IPSR_GPSR(IP5_23_20,     D4),
+       PINMUX_IPSR_GPSR(IP5_23_20,     MMC_CMD),
+
+       PINMUX_IPSR_GPSR(IP5_27_24,     VI1_DATA2),
+       PINMUX_IPSR_MSEL(IP5_27_24,     CANFD0_TX_B,    SEL_CANFD0_1),
+       PINMUX_IPSR_GPSR(IP5_27_24,     D5),
+       PINMUX_IPSR_GPSR(IP5_27_24,     MMC_D0),
+
+       PINMUX_IPSR_GPSR(IP5_31_28,     VI1_DATA3),
+       PINMUX_IPSR_MSEL(IP5_31_28,     CANFD0_RX_B,    SEL_CANFD0_1),
+       PINMUX_IPSR_GPSR(IP5_31_28,     D6),
+       PINMUX_IPSR_GPSR(IP5_31_28,     MMC_D1),
+
+       /* IPSR6 */
+       PINMUX_IPSR_GPSR(IP6_3_0,       VI1_DATA4),
+       PINMUX_IPSR_MSEL(IP6_3_0,       CANFD_CLK_B,    SEL_CANFD0_1),
+       PINMUX_IPSR_GPSR(IP6_3_0,       D7),
+       PINMUX_IPSR_GPSR(IP6_3_0,       MMC_D2),
+
+       PINMUX_IPSR_GPSR(IP6_7_4,       VI1_DATA5),
+       PINMUX_IPSR_GPSR(IP6_7_4,       SCK4),
+       PINMUX_IPSR_GPSR(IP6_7_4,       D8),
+       PINMUX_IPSR_GPSR(IP6_7_4,       MMC_D3),
+
+       PINMUX_IPSR_GPSR(IP6_11_8,      VI1_DATA6),
+       PINMUX_IPSR_GPSR(IP6_11_8,      RX4),
+       PINMUX_IPSR_GPSR(IP6_11_8,      D9),
+       PINMUX_IPSR_GPSR(IP6_11_8,      MMC_CLK),
+
+       PINMUX_IPSR_GPSR(IP6_15_12,     VI1_DATA7),
+       PINMUX_IPSR_GPSR(IP6_15_12,     TX4),
+       PINMUX_IPSR_GPSR(IP6_15_12,     D10),
+       PINMUX_IPSR_GPSR(IP6_15_12,     MMC_D4),
+
+       PINMUX_IPSR_GPSR(IP6_19_16,     VI1_DATA8),
+       PINMUX_IPSR_GPSR(IP6_19_16,     CTS4_N),
+       PINMUX_IPSR_GPSR(IP6_19_16,     D11),
+       PINMUX_IPSR_GPSR(IP6_19_16,     MMC_D5),
+
+       PINMUX_IPSR_GPSR(IP6_23_20,     VI1_DATA9),
+       PINMUX_IPSR_GPSR(IP6_23_20,     RTS4_N_TANS),
+       PINMUX_IPSR_GPSR(IP6_23_20,     D12),
+       PINMUX_IPSR_GPSR(IP6_23_20,     MMC_D6),
+       PINMUX_IPSR_GPSR(IP6_23_20,     SCL3_B),
+
+       PINMUX_IPSR_GPSR(IP6_27_24,     VI1_DATA10),
+       PINMUX_IPSR_GPSR(IP6_27_24,     D13),
+       PINMUX_IPSR_GPSR(IP6_27_24,     MMC_D7),
+       PINMUX_IPSR_GPSR(IP6_27_24,     SDA3_B),
+
+       PINMUX_IPSR_GPSR(IP6_31_28,     VI1_DATA11),
+       PINMUX_IPSR_GPSR(IP6_31_28,     SCL4),
+       PINMUX_IPSR_GPSR(IP6_31_28,     IRQ4),
+       PINMUX_IPSR_GPSR(IP6_31_28,     D14),
+       PINMUX_IPSR_GPSR(IP6_31_28,     MMC_WP),
+
+       /* IPSR7 */
+       PINMUX_IPSR_GPSR(IP7_3_0,       VI1_FIELD),
+       PINMUX_IPSR_GPSR(IP7_3_0,       SDA4),
+       PINMUX_IPSR_GPSR(IP7_3_0,       IRQ5),
+       PINMUX_IPSR_GPSR(IP7_3_0,       D15),
+       PINMUX_IPSR_GPSR(IP7_3_0,       MMC_CD),
+
+       PINMUX_IPSR_GPSR(IP7_7_4,       SCL0),
+       PINMUX_IPSR_GPSR(IP7_7_4,       DU_DR0),
+       PINMUX_IPSR_GPSR(IP7_7_4,       TPU0TO0),
+       PINMUX_IPSR_GPSR(IP7_7_4,       CLKOUT),
+       PINMUX_IPSR_GPSR(IP7_7_4,       MSIOF0_RXD),
+
+       PINMUX_IPSR_GPSR(IP7_11_8,      SDA0),
+       PINMUX_IPSR_GPSR(IP7_11_8,      DU_DR1),
+       PINMUX_IPSR_GPSR(IP7_11_8,      TPU0TO1),
+       PINMUX_IPSR_GPSR(IP7_11_8,      BS_N),
+       PINMUX_IPSR_GPSR(IP7_11_8,      SCK0),
+       PINMUX_IPSR_GPSR(IP7_11_8,      MSIOF0_TXD),
+
+       PINMUX_IPSR_GPSR(IP7_15_12,     SCL1),
+       PINMUX_IPSR_GPSR(IP7_15_12,     DU_DG0),
+       PINMUX_IPSR_GPSR(IP7_15_12,     TPU0TO2),
+       PINMUX_IPSR_GPSR(IP7_15_12,     RD_N),
+       PINMUX_IPSR_GPSR(IP7_15_12,     CTS0_N),
+       PINMUX_IPSR_GPSR(IP7_15_12,     MSIOF0_SCK),
+
+       PINMUX_IPSR_GPSR(IP7_19_16,     SDA1),
+       PINMUX_IPSR_GPSR(IP7_19_16,     DU_DG1),
+       PINMUX_IPSR_GPSR(IP7_19_16,     TPU0TO3),
+       PINMUX_IPSR_GPSR(IP7_19_16,     WE0_N),
+       PINMUX_IPSR_GPSR(IP7_19_16,     RTS0_N_TANS),
+       PINMUX_IPSR_GPSR(IP7_19_16,     MSIOF0_SYNC),
+
+       PINMUX_IPSR_GPSR(IP7_23_20,     SCL2),
+       PINMUX_IPSR_GPSR(IP7_23_20,     DU_DB0),
+       PINMUX_IPSR_MSEL(IP7_23_20,     TCLK1_A,        SEL_TMU_0),
+       PINMUX_IPSR_GPSR(IP7_23_20,     WE1_N),
+       PINMUX_IPSR_GPSR(IP7_23_20,     RX0),
+       PINMUX_IPSR_GPSR(IP7_23_20,     MSIOF0_SS1),
+
+       PINMUX_IPSR_GPSR(IP7_27_24,     SDA2),
+       PINMUX_IPSR_GPSR(IP7_27_24,     DU_DB1),
+       PINMUX_IPSR_MSEL(IP7_27_24,     TCLK2_A,        SEL_TMU_0),
+       PINMUX_IPSR_GPSR(IP7_27_24,     EX_WAIT0),
+       PINMUX_IPSR_GPSR(IP7_27_24,     TX0),
+       PINMUX_IPSR_GPSR(IP7_27_24,     MSIOF0_SS2),
+
+       PINMUX_IPSR_GPSR(IP7_31_28,     AVB0_AVTP_CAPTURE),
+       PINMUX_IPSR_GPSR(IP7_31_28,     FSCLKST2_N_B),
+
+       /* IPSR8 */
+       PINMUX_IPSR_MSEL(IP8_3_0,       CANFD0_TX_A,    SEL_CANFD0_0),
+       PINMUX_IPSR_GPSR(IP8_3_0,       FXR_TXDA),
+       PINMUX_IPSR_MSEL(IP8_3_0,       PWM0_B, SEL_PWM0_1),
+       PINMUX_IPSR_GPSR(IP8_3_0,       DU_DISP),
+       PINMUX_IPSR_GPSR(IP8_3_0,       FSCLKST2_N_C),
+
+       PINMUX_IPSR_MSEL(IP8_7_4,       CANFD0_RX_A,    SEL_CANFD0_0),
+       PINMUX_IPSR_GPSR(IP8_7_4,       RXDA_EXTFXR),
+       PINMUX_IPSR_MSEL(IP8_7_4,       PWM1_B, SEL_PWM1_1),
+       PINMUX_IPSR_GPSR(IP8_7_4,       DU_CDE),
+
+       PINMUX_IPSR_GPSR(IP8_11_8,      CANFD1_TX),
+       PINMUX_IPSR_GPSR(IP8_11_8,      FXR_TXDB),
+       PINMUX_IPSR_MSEL(IP8_11_8,      PWM2_B, SEL_PWM2_1),
+       PINMUX_IPSR_MSEL(IP8_11_8,      TCLK1_B,        SEL_TMU_1),
+       PINMUX_IPSR_MSEL(IP8_11_8,      TX1_B,  SEL_SCIF1_1),
+
+       PINMUX_IPSR_GPSR(IP8_15_12,     CANFD1_RX),
+       PINMUX_IPSR_GPSR(IP8_15_12,     RXDB_EXTFXR),
+       PINMUX_IPSR_MSEL(IP8_15_12,     PWM3_B, SEL_PWM3_1),
+       PINMUX_IPSR_MSEL(IP8_15_12,     TCLK2_B,        SEL_TMU_1),
+       PINMUX_IPSR_MSEL(IP8_15_12,     RX1_B,  SEL_SCIF1_1),
+
+       PINMUX_IPSR_MSEL(IP8_19_16,     CANFD_CLK_A,    SEL_CANFD0_0),
+       PINMUX_IPSR_GPSR(IP8_19_16,     CLK_EXTFXR),
+       PINMUX_IPSR_MSEL(IP8_19_16,     PWM4_B, SEL_PWM4_1),
+       PINMUX_IPSR_MSEL(IP8_19_16,     SPEEDIN_B,      SEL_RSP_0),
+       PINMUX_IPSR_MSEL(IP8_19_16,     SCIF_CLK_B,     SEL_HSCIF0_1),
+
+       PINMUX_IPSR_GPSR(IP8_23_20,     DIGRF_CLKIN),
+       PINMUX_IPSR_GPSR(IP8_23_20,     DIGRF_CLKEN_IN),
+
+       PINMUX_IPSR_GPSR(IP8_27_24,     DIGRF_CLKOUT),
+       PINMUX_IPSR_GPSR(IP8_27_24,     DIGRF_CLKEN_OUT),
+};
+
+static const struct sh_pfc_pin pinmux_pins[] = {
+       PINMUX_GPIO_GP_ALL(),
+};
+
+/* - EtherAVB --------------------------------------------------------------- */
+static const unsigned int avb0_rx_ctrl_pins[] = {
+       /* AVB0_RX_CTL */
+       RCAR_GP_PIN(1, 1),
+};
+static const unsigned int avb0_rx_ctrl_mux[] = {
+       AVB0_RX_CTL_MARK,
+};
+static const unsigned int avb0_rxc_pins[] = {
+       /* AVB0_RXC */
+       RCAR_GP_PIN(1, 2),
+};
+static const unsigned int avb0_rxc_mux[] = {
+       AVB0_RXC_MARK,
+};
+static const unsigned int avb0_rd0_pins[] = {
+       /* AVB0_RD[0] */
+       RCAR_GP_PIN(1, 3),
+};
+static const unsigned int avb0_rd0_mux[] = {
+       AVB0_RD0_MARK,
+};
+static const unsigned int avb0_rd1_pins[] = {
+       /* AVB0_RD[1] */
+       RCAR_GP_PIN(1, 4),
+};
+static const unsigned int avb0_rd1_mux[] = {
+       AVB0_RD1_MARK,
+};
+static const unsigned int avb0_rd2_pins[] = {
+       /* AVB0_RD[2] */
+       RCAR_GP_PIN(1, 5),
+};
+static const unsigned int avb0_rd2_mux[] = {
+       AVB0_RD2_MARK,
+};
+static const unsigned int avb0_rd3_pins[] = {
+       /* AVB0_RD[3] */
+       RCAR_GP_PIN(1, 6),
+};
+static const unsigned int avb0_rd3_mux[] = {
+       AVB0_RD3_MARK,
+};
+static const unsigned int avb0_rd4_pins[] = {
+       /* AVB0_RD[3:0] */
+       RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 4),
+       RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6),
+};
+static const unsigned int avb0_rd4_mux[] = {
+       AVB0_RD0_MARK, AVB0_RD1_MARK,
+       AVB0_RD2_MARK, AVB0_RD3_MARK,
+};
+static const unsigned int avb0_tx_ctrl_pins[] = {
+       /* AVB0_TX_CTL */
+       RCAR_GP_PIN(1, 7),
+};
+static const unsigned int avb0_tx_ctrl_mux[] = {
+       AVB0_TX_CTL_MARK,
+};
+static const unsigned int avb0_txc_pins[] = {
+       /* AVB0_TXC */
+       RCAR_GP_PIN(1, 8),
+};
+static const unsigned int avb0_txc_mux[] = {
+       AVB0_TXC_MARK,
+};
+static const unsigned int avb0_td0_pins[] = {
+       /* AVB0_TD[0] */
+       RCAR_GP_PIN(1, 9),
+};
+static const unsigned int avb0_td0_mux[] = {
+       AVB0_TD0_MARK,
+};
+static const unsigned int avb0_td1_pins[] = {
+       /* AVB0_TD[1] */
+       RCAR_GP_PIN(1, 10),
+};
+static const unsigned int avb0_td1_mux[] = {
+       AVB0_TD1_MARK,
+};
+static const unsigned int avb0_td2_pins[] = {
+       /* AVB0_TD[2] */
+       RCAR_GP_PIN(1, 11),
+};
+static const unsigned int avb0_td2_mux[] = {
+       AVB0_TD2_MARK,
+};
+static const unsigned int avb0_td3_pins[] = {
+       /* AVB0_TD[3] */
+       RCAR_GP_PIN(1, 12),
+};
+static const unsigned int avb0_td3_mux[] = {
+       AVB0_TD3_MARK,
+};
+static const unsigned int avb0_td4_pins[] = {
+       /* AVB0_TD[3:0] */
+       RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 10),
+       RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 12),
+};
+static const unsigned int avb0_td4_mux[] = {
+       AVB0_TD0_MARK, AVB0_TD1_MARK,
+       AVB0_TD2_MARK, AVB0_TD3_MARK,
+};
+static const unsigned int avb0_txcrefclk_pins[] = {
+       /* AVB0_TXCREFCLK */
+       RCAR_GP_PIN(1, 13),
+};
+static const unsigned int avb0_txcrefclk_mux[] = {
+       AVB0_TXCREFCLK_MARK,
+};
+static const unsigned int avb0_mdio_pins[] = {
+       /* AVB0_MDIO */
+       RCAR_GP_PIN(1, 14),
+};
+static const unsigned int avb0_mdio_mux[] = {
+       AVB0_MDIO_MARK,
+};
+static const unsigned int avb0_mdc_pins[] = {
+       /* AVB0_MDC */
+       RCAR_GP_PIN(1, 15),
+};
+static const unsigned int avb0_mdc_mux[] = {
+       AVB0_MDC_MARK,
+};
+static const unsigned int avb0_magic_pins[] = {
+       /* AVB0_MAGIC */
+       RCAR_GP_PIN(1, 16),
+};
+static const unsigned int avb0_magic_mux[] = {
+       AVB0_MAGIC_MARK,
+};
+static const unsigned int avb0_phy_int_pins[] = {
+       /* AVB0_PHY_INT */
+       RCAR_GP_PIN(1, 17),
+};
+static const unsigned int avb0_phy_int_mux[] = {
+       AVB0_PHY_INT_MARK,
+};
+static const unsigned int avb0_link_pins[] = {
+       /* AVB0_LINK */
+       RCAR_GP_PIN(1, 18),
+};
+static const unsigned int avb0_link_mux[] = {
+       AVB0_LINK_MARK,
+};
+static const unsigned int avb0_avtp_match_pins[] = {
+       /* AVB0_AVTP_MATCH */
+       RCAR_GP_PIN(1, 19),
+};
+static const unsigned int avb0_avtp_match_mux[] = {
+       AVB0_AVTP_MATCH_MARK,
+};
+static const unsigned int avb0_avtp_pps_pins[] = {
+       /* AVB0_AVTP_PPS */
+       RCAR_GP_PIN(2, 6),
+};
+static const unsigned int avb0_avtp_pps_mux[] = {
+       AVB0_AVTP_PPS_MARK,
+};
+static const unsigned int avb0_avtp_capture_pins[] = {
+       /* AVB0_AVTP_CAPTURE */
+       RCAR_GP_PIN(1, 20),
+};
+static const unsigned int avb0_avtp_capture_mux[] = {
+       AVB0_AVTP_CAPTURE_MARK,
+};
+
+/* - CANFD0 ----------------------------------------------------------------- */
+static const unsigned int canfd0_data_a_pins[] = {
+       /* TX, RX */
+       RCAR_GP_PIN(1, 21), RCAR_GP_PIN(1, 22),
+};
+static const unsigned int canfd0_data_a_mux[] = {
+       CANFD0_TX_A_MARK, CANFD0_RX_A_MARK,
+};
+static const unsigned int canfd_clk_a_pins[] = {
+       /* CLK */
+       RCAR_GP_PIN(1, 25),
+};
+static const unsigned int canfd_clk_a_mux[] = {
+       CANFD_CLK_A_MARK,
+};
+static const unsigned int canfd0_data_b_pins[] = {
+       /* TX, RX */
+       RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
+};
+static const unsigned int canfd0_data_b_mux[] = {
+       CANFD0_TX_B_MARK, CANFD0_RX_B_MARK,
+};
+static const unsigned int canfd_clk_b_pins[] = {
+       /* CLK */
+       RCAR_GP_PIN(3, 8),
+};
+static const unsigned int canfd_clk_b_mux[] = {
+       CANFD_CLK_B_MARK,
+};
+
+/* - CANFD1 ----------------------------------------------------------------- */
+static const unsigned int canfd1_data_pins[] = {
+       /* TX, RX */
+       RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24),
+};
+static const unsigned int canfd1_data_mux[] = {
+       CANFD1_TX_MARK, CANFD1_RX_MARK,
+};
+
+/* - DU --------------------------------------------------------------------- */
+static const unsigned int du_rgb666_pins[] = {
+       /* R[7:0] */
+       RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 4),
+       RCAR_GP_PIN(0, 3), RCAR_GP_PIN(0, 2),
+       RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 0),
+       /* G[7:0] */
+       RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10),
+       RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 8),
+       RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 6),
+       /* B[7:0] */
+       RCAR_GP_PIN(0, 17), RCAR_GP_PIN(0, 16),
+       RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14),
+       RCAR_GP_PIN(0, 13), RCAR_GP_PIN(0, 12),
+};
+static const unsigned int du_rgb666_mux[] = {
+       DU_DR7_MARK, DU_DR6_MARK,
+       DU_DR5_MARK, DU_DR4_MARK,
+       DU_DR3_MARK, DU_DR2_MARK,
+       DU_DG7_MARK, DU_DG6_MARK,
+       DU_DG5_MARK, DU_DG4_MARK,
+       DU_DG3_MARK, DU_DG2_MARK,
+       DU_DB7_MARK, DU_DB6_MARK,
+       DU_DB5_MARK, DU_DB4_MARK,
+       DU_DB3_MARK, DU_DB2_MARK,
+};
+static const unsigned int du_clk_out_0_pins[] = {
+       /* CLKOUT0 */
+       RCAR_GP_PIN(0, 18),
+};
+static const unsigned int du_clk_out_0_mux[] = {
+       DU_DOTCLKOUT_MARK,
+};
+static const unsigned int du_clk_out_1_pins[] = {
+       /* CLKOUT1 */
+       RCAR_GP_PIN(0, 18),             /* @@ */
+};
+static const unsigned int du_clk_out_1_mux[] = {
+       DU_DOTCLKOUT_MARK,
+};
+static const unsigned int du_sync_pins[] = {
+       /* EXVSYNC/VSYNC, EXHSYNC/HSYNC */
+       RCAR_GP_PIN(0, 20), RCAR_GP_PIN(0, 19),
+};
+static const unsigned int du_sync_mux[] = {
+       DU_EXVSYNC_DU_VSYNC_MARK, DU_EXHSYNC_DU_HSYNC_MARK,
+};
+static const unsigned int du_oddf_pins[] = {
+       /* EXDISP/EXODDF/EXCDE */
+       RCAR_GP_PIN(0, 21),
+};
+static const unsigned int du_oddf_mux[] = {
+       DU_EXODDF_DU_ODDF_DISP_CDE_MARK,
+};
+static const unsigned int du_cde_pins[] = {
+       /* CDE */
+       RCAR_GP_PIN(1, 22),
+};
+static const unsigned int du_cde_mux[] = {
+       DU_CDE_MARK,
+};
+static const unsigned int du_disp_pins[] = {
+       /* DISP */
+       RCAR_GP_PIN(1, 21),
+};
+static const unsigned int du_disp_mux[] = {
+       DU_DISP_MARK,
+};
+
+/* - HSCIF0 ----------------------------------------------------------------- */
+static const unsigned int hscif0_data_pins[] = {
+       /* HRX0, HTX0 */
+       RCAR_GP_PIN(0, 19), RCAR_GP_PIN(0, 3),
+};
+static const unsigned int hscif0_data_mux[] = {
+       HRX0_MARK, HTX0_MARK,
+};
+static const unsigned int hscif0_clk_pins[] = {
+       /* HSCK0 */
+       RCAR_GP_PIN(0, 0),
+};
+static const unsigned int hscif0_clk_mux[] = {
+       HSCK0_MARK,
+};
+static const unsigned int hscif0_ctrl_pins[] = {
+       /* HRTS0#, HCTS0# */
+       RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 2),
+};
+static const unsigned int hscif0_ctrl_mux[] = {
+       HRTS0_N_MARK, HCTS0_N_MARK,
+};
+
+/* - HSCIF1 ----------------------------------------------------------------- */
+static const unsigned int hscif1_data_pins[] = {
+       /* HRX1, HTX1 */
+       RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 10),
+};
+static const unsigned int hscif1_data_mux[] = {
+       HRX1_MARK, HTX1_MARK,
+};
+static const unsigned int hscif1_clk_pins[] = {
+       /* HSCK1 */
+       RCAR_GP_PIN(2, 7),
+};
+static const unsigned int hscif1_clk_mux[] = {
+       HSCK1_MARK,
+};
+static const unsigned int hscif1_ctrl_pins[] = {
+       /* HRTS1#, HCTS1# */
+       RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
+};
+static const unsigned int hscif1_ctrl_mux[] = {
+       HRTS1_N_MARK, HCTS1_N_MARK,
+};
+
+/* - HSCIF2 ----------------------------------------------------------------- */
+static const unsigned int hscif2_data_pins[] = {
+       /* HRX2, HTX2 */
+       RCAR_GP_PIN(2, 16), RCAR_GP_PIN(2, 15),
+};
+static const unsigned int hscif2_data_mux[] = {
+       HRX2_MARK, HTX2_MARK,
+};
+static const unsigned int hscif2_clk_pins[] = {
+       /* HSCK2 */
+       RCAR_GP_PIN(2, 12),
+};
+static const unsigned int hscif2_clk_mux[] = {
+       HSCK2_MARK,
+};
+static const unsigned int hscif2_ctrl_pins[] = {
+       /* HRTS2#, HCTS2# */
+       RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 13),
+};
+static const unsigned int hscif2_ctrl_mux[] = {
+       HRTS2_N_MARK, HCTS2_N_MARK,
+};
+
+/* - HSCIF3 ----------------------------------------------------------------- */
+static const unsigned int hscif3_data_pins[] = {
+       /* HRX3, HTX3 */
+       RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 3),
+};
+static const unsigned int hscif3_data_mux[] = {
+       HRX3_MARK, HTX3_MARK,
+};
+static const unsigned int hscif3_clk_pins[] = {
+       /* HSCK3 */
+       RCAR_GP_PIN(2, 0),
+};
+static const unsigned int hscif3_clk_mux[] = {
+       HSCK3_MARK,
+};
+static const unsigned int hscif3_ctrl_pins[] = {
+       /* HRTS3#, HCTS3# */
+       RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 1),
+};
+static const unsigned int hscif3_ctrl_mux[] = {
+       HRTS3_N_MARK, HCTS3_N_MARK,
+};
+
+/* - SCIF Clock ------------------------------------------------------------- */
+static const unsigned int scif_clk_a_pins[] = {
+       /* SCIF_CLK */
+       RCAR_GP_PIN(0, 18),
+};
+static const unsigned int scif_clk_a_mux[] = {
+       SCIF_CLK_A_MARK,
+};
+static const unsigned int scif_clk_b_pins[] = {
+       /* SCIF_CLK */
+       RCAR_GP_PIN(1, 25),
+};
+static const unsigned int scif_clk_b_mux[] = {
+       SCIF_CLK_B_MARK,
+};
+
+/* - I2C -------------------------------------------------------------------- */
+static const unsigned int i2c0_pins[] = {
+       /* SDA0, SCL0 */
+       RCAR_GP_PIN(4, 1), RCAR_GP_PIN(4, 0),
+};
+static const unsigned int i2c0_mux[] = {
+       SDA0_MARK, SCL0_MARK,
+};
+static const unsigned int i2c1_pins[] = {
+       /* SDA1, SCL1 */
+       RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2),
+};
+static const unsigned int i2c1_mux[] = {
+       SDA1_MARK, SCL1_MARK,
+};
+static const unsigned int i2c2_pins[] = {
+       /* SDA2, SCL2 */
+       RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 4),
+};
+static const unsigned int i2c2_mux[] = {
+       SDA2_MARK, SCL2_MARK,
+};
+static const unsigned int i2c3_pins[] = {
+       /* SDA3_A, SCL3_A */
+       RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 5),
+};
+static const unsigned int i2c3_mux[] = {
+       SDA3_A_MARK, SCL3_A_MARK,
+};
+static const unsigned int i2c4_pins[] = {
+       /* SDA4, SCL4 */
+       RCAR_GP_PIN(3, 16), RCAR_GP_PIN(3, 15),
+};
+static const unsigned int i2c4_mux[] = {
+       SDA4_MARK, SCL4_MARK,
+};
+
+/* - INTC-EX ---------------------------------------------------------------- */
+static const unsigned int intc_ex_irq0_pins[] = {
+       /* IRQ0 */
+       RCAR_GP_PIN(1, 0),
+};
+static const unsigned int intc_ex_irq0_mux[] = {
+       IRQ0_MARK,
+};
+static const unsigned int intc_ex_irq1_pins[] = {
+       /* IRQ1 */
+       RCAR_GP_PIN(0, 11),
+};
+static const unsigned int intc_ex_irq1_mux[] = {
+       IRQ1_MARK,
+};
+static const unsigned int intc_ex_irq2_pins[] = {
+       /* IRQ2 */
+       RCAR_GP_PIN(0, 12),
+};
+static const unsigned int intc_ex_irq2_mux[] = {
+       IRQ2_MARK,
+};
+static const unsigned int intc_ex_irq3_pins[] = {
+       /* IRQ3 */
+       RCAR_GP_PIN(0, 19),
+};
+static const unsigned int intc_ex_irq3_mux[] = {
+       IRQ3_MARK,
+};
+static const unsigned int intc_ex_irq4_pins[] = {
+       /* IRQ4 */
+       RCAR_GP_PIN(3, 15),
+};
+static const unsigned int intc_ex_irq4_mux[] = {
+       IRQ4_MARK,
+};
+static const unsigned int intc_ex_irq5_pins[] = {
+       /* IRQ5 */
+       RCAR_GP_PIN(3, 16),
+};
+static const unsigned int intc_ex_irq5_mux[] = {
+       IRQ5_MARK,
+};
+
+/* - MSIOF0 ----------------------------------------------------------------- */
+static const unsigned int msiof0_clk_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(4, 2),
+};
+static const unsigned int msiof0_clk_mux[] = {
+       MSIOF0_SCK_MARK,
+};
+static const unsigned int msiof0_sync_pins[] = {
+       /* SYNC */
+       RCAR_GP_PIN(4, 3),
+};
+static const unsigned int msiof0_sync_mux[] = {
+       MSIOF0_SYNC_MARK,
+};
+static const unsigned int msiof0_ss1_pins[] = {
+       /* SS1 */
+       RCAR_GP_PIN(4, 4),
+};
+static const unsigned int msiof0_ss1_mux[] = {
+       MSIOF0_SS1_MARK,
+};
+static const unsigned int msiof0_ss2_pins[] = {
+       /* SS2 */
+       RCAR_GP_PIN(4, 5),
+};
+static const unsigned int msiof0_ss2_mux[] = {
+       MSIOF0_SS2_MARK,
+};
+static const unsigned int msiof0_txd_pins[] = {
+       /* TXD */
+       RCAR_GP_PIN(4, 1),
+};
+static const unsigned int msiof0_txd_mux[] = {
+       MSIOF0_TXD_MARK,
+};
+static const unsigned int msiof0_rxd_pins[] = {
+       /* RXD */
+       RCAR_GP_PIN(4, 0),
+};
+static const unsigned int msiof0_rxd_mux[] = {
+       MSIOF0_RXD_MARK,
+};
+
+/* - MSIOF1 ----------------------------------------------------------------- */
+static const unsigned int msiof1_clk_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(3, 2),
+};
+static const unsigned int msiof1_clk_mux[] = {
+       MSIOF1_SCK_MARK,
+};
+static const unsigned int msiof1_sync_pins[] = {
+       /* SYNC */
+       RCAR_GP_PIN(3, 3),
+};
+static const unsigned int msiof1_sync_mux[] = {
+       MSIOF1_SYNC_MARK,
+};
+static const unsigned int msiof1_ss1_pins[] = {
+       /* SS1 */
+       RCAR_GP_PIN(3, 4),
+};
+static const unsigned int msiof1_ss1_mux[] = {
+       MSIOF1_SS1_MARK,
+};
+static const unsigned int msiof1_ss2_pins[] = {
+       /* SS2 */
+       RCAR_GP_PIN(3, 5),
+};
+static const unsigned int msiof1_ss2_mux[] = {
+       MSIOF1_SS2_MARK,
+};
+static const unsigned int msiof1_txd_pins[] = {
+       /* TXD */
+       RCAR_GP_PIN(3, 1),
+};
+static const unsigned int msiof1_txd_mux[] = {
+       MSIOF1_TXD_MARK,
+};
+static const unsigned int msiof1_rxd_pins[] = {
+       /* RXD */
+       RCAR_GP_PIN(3, 0),
+};
+static const unsigned int msiof1_rxd_mux[] = {
+       MSIOF1_RXD_MARK,
+};
+
+/* - MSIOF2 ----------------------------------------------------------------- */
+static const unsigned int msiof2_clk_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(2, 0),
+};
+static const unsigned int msiof2_clk_mux[] = {
+       MSIOF2_SCK_MARK,
+};
+static const unsigned int msiof2_sync_pins[] = {
+       /* SYNC */
+       RCAR_GP_PIN(2, 3),
+};
+static const unsigned int msiof2_sync_mux[] = {
+       MSIOF2_SYNC_MARK,
+};
+static const unsigned int msiof2_ss1_pins[] = {
+       /* SS1 */
+       RCAR_GP_PIN(2, 4),
+};
+static const unsigned int msiof2_ss1_mux[] = {
+       MSIOF2_SS1_MARK,
+};
+static const unsigned int msiof2_ss2_pins[] = {
+       /* SS2 */
+       RCAR_GP_PIN(2, 5),
+};
+static const unsigned int msiof2_ss2_mux[] = {
+       MSIOF2_SS2_MARK,
+};
+static const unsigned int msiof2_txd_pins[] = {
+       /* TXD */
+       RCAR_GP_PIN(2, 2),
+};
+static const unsigned int msiof2_txd_mux[] = {
+       MSIOF2_TXD_MARK,
+};
+static const unsigned int msiof2_rxd_pins[] = {
+       /* RXD */
+       RCAR_GP_PIN(2, 1),
+};
+static const unsigned int msiof2_rxd_mux[] = {
+       MSIOF2_RXD_MARK,
+};
+
+/* - MSIOF3 ----------------------------------------------------------------- */
+static const unsigned int msiof3_clk_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(0, 20),
+};
+static const unsigned int msiof3_clk_mux[] = {
+       MSIOF3_SCK_MARK,
+};
+static const unsigned int msiof3_sync_pins[] = {
+       /* SYNC */
+       RCAR_GP_PIN(0, 21),
+};
+static const unsigned int msiof3_sync_mux[] = {
+       MSIOF3_SYNC_MARK,
+};
+static const unsigned int msiof3_ss1_pins[] = {
+       /* SS1 */
+       RCAR_GP_PIN(0, 6),
+};
+static const unsigned int msiof3_ss1_mux[] = {
+       MSIOF3_SS1_MARK,
+};
+static const unsigned int msiof3_ss2_pins[] = {
+       /* SS2 */
+       RCAR_GP_PIN(0, 7),
+};
+static const unsigned int msiof3_ss2_mux[] = {
+       MSIOF3_SS2_MARK,
+};
+static const unsigned int msiof3_txd_pins[] = {
+       /* TXD */
+       RCAR_GP_PIN(0, 5),
+};
+static const unsigned int msiof3_txd_mux[] = {
+       MSIOF3_TXD_MARK,
+};
+static const unsigned int msiof3_rxd_pins[] = {
+       /* RXD */
+       RCAR_GP_PIN(0, 4),
+};
+static const unsigned int msiof3_rxd_mux[] = {
+       MSIOF3_RXD_MARK,
+};
+
+/* - PWM0 ------------------------------------------------------------------- */
+static const unsigned int pwm0_a_pins[] = {
+       /* PWM0 */
+       RCAR_GP_PIN(2, 12),
+};
+static const unsigned int pwm0_a_mux[] = {
+       PWM0_A_MARK,
+};
+static const unsigned int pwm0_b_pins[] = {
+       /* PWM0 */
+       RCAR_GP_PIN(1, 21),
+};
+static const unsigned int pwm0_b_mux[] = {
+       PWM0_B_MARK,
+};
+
+/* - PWM1 ------------------------------------------------------------------- */
+static const unsigned int pwm1_a_pins[] = {
+       /* PWM1 */
+       RCAR_GP_PIN(2, 13),
+};
+static const unsigned int pwm1_a_mux[] = {
+       PWM1_A_MARK,
+};
+static const unsigned int pwm1_b_pins[] = {
+       /* PWM1 */
+       RCAR_GP_PIN(1, 22),
+};
+static const unsigned int pwm1_b_mux[] = {
+       PWM1_B_MARK,
+};
+
+/* - PWM2 ------------------------------------------------------------------- */
+static const unsigned int pwm2_a_pins[] = {
+       /* PWM2 */
+       RCAR_GP_PIN(2, 14),
+};
+static const unsigned int pwm2_a_mux[] = {
+       PWM2_A_MARK,
+};
+static const unsigned int pwm2_b_pins[] = {
+       /* PWM2 */
+       RCAR_GP_PIN(1, 23),
+};
+static const unsigned int pwm2_b_mux[] = {
+       PWM2_B_MARK,
+};
+
+/* - PWM3 ------------------------------------------------------------------- */
+static const unsigned int pwm3_a_pins[] = {
+       /* PWM3 */
+       RCAR_GP_PIN(2, 15),
+};
+static const unsigned int pwm3_a_mux[] = {
+       PWM3_A_MARK,
+};
+static const unsigned int pwm3_b_pins[] = {
+       /* PWM3 */
+       RCAR_GP_PIN(1, 24),
+};
+static const unsigned int pwm3_b_mux[] = {
+       PWM3_B_MARK,
+};
+
+/* - PWM4 ------------------------------------------------------------------- */
+static const unsigned int pwm4_a_pins[] = {
+       /* PWM4 */
+       RCAR_GP_PIN(2, 16),
+};
+static const unsigned int pwm4_a_mux[] = {
+       PWM4_A_MARK,
+};
+static const unsigned int pwm4_b_pins[] = {
+       /* PWM4 */
+       RCAR_GP_PIN(1, 25),
+};
+static const unsigned int pwm4_b_mux[] = {
+       PWM4_B_MARK,
+};
+
+/* - SCIF0 ------------------------------------------------------------------ */
+static const unsigned int scif0_data_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5),
+};
+static const unsigned int scif0_data_mux[] = {
+       RX0_MARK, TX0_MARK,
+};
+static const unsigned int scif0_clk_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(4, 1),
+};
+static const unsigned int scif0_clk_mux[] = {
+       SCK0_MARK,
+};
+
+static const unsigned int scif0_ctrl_pins[] = {
+       /* RTS, CTS */
+       RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2),
+};
+static const unsigned int scif0_ctrl_mux[] = {
+       RTS0_N_TANS_MARK, CTS0_N_MARK,
+};
+
+/* - SCIF1 ------------------------------------------------------------------ */
+static const unsigned int scif1_data_a_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
+};
+static const unsigned int scif1_data_a_mux[] = {
+       RX1_A_MARK, TX1_A_MARK,
+};
+static const unsigned int scif1_clk_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(2, 5),
+};
+static const unsigned int scif1_clk_mux[] = {
+       SCK1_MARK,
+};
+static const unsigned int scif1_ctrl_pins[] = {
+       /* RTS, CTS */
+       RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 10),
+};
+static const unsigned int scif1_ctrl_mux[] = {
+       RTS1_N_TANS_MARK, CTS1_N_MARK,
+};
+static const unsigned int scif1_data_b_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(1, 24), RCAR_GP_PIN(1, 23),
+};
+static const unsigned int scif1_data_b_mux[] = {
+       RX1_B_MARK, TX1_B_MARK,
+};
+
+/* - SCIF3 ------------------------------------------------------------------ */
+static const unsigned int scif3_data_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(2, 1), RCAR_GP_PIN(2, 2),
+};
+static const unsigned int scif3_data_mux[] = {
+       RX3_MARK, TX3_MARK,
+};
+static const unsigned int scif3_clk_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(2, 0),
+};
+static const unsigned int scif3_clk_mux[] = {
+       SCK3_MARK,
+};
+static const unsigned int scif3_ctrl_pins[] = {
+       /* RTS, CTS */
+       RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 3),
+};
+static const unsigned int scif3_ctrl_mux[] = {
+       RTS3_N_TANS_MARK, CTS3_N_MARK,
+};
+
+/* - SCIF4 ------------------------------------------------------------------ */
+static const unsigned int scif4_data_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
+};
+static const unsigned int scif4_data_mux[] = {
+       RX4_MARK, TX4_MARK,
+};
+static const unsigned int scif4_clk_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(3, 9),
+};
+static const unsigned int scif4_clk_mux[] = {
+       SCK4_MARK,
+};
+static const unsigned int scif4_ctrl_pins[] = {
+       /* RTS, CTS */
+       RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 12),
+};
+static const unsigned int scif4_ctrl_mux[] = {
+       RTS4_N_TANS_MARK, CTS4_N_MARK,
+};
+
+/* - MMC -------------------------------------------------------------------- */
+static const unsigned int mmc_data1_pins[] = {
+       /* D0 */
+       RCAR_GP_PIN(3, 6),
+};
+static const unsigned int mmc_data1_mux[] = {
+       MMC_D0_MARK,
+};
+static const unsigned int mmc_data4_pins[] = {
+       /* D[0:3] */
+       RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
+       RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
+};
+static const unsigned int mmc_data4_mux[] = {
+       MMC_D0_MARK, MMC_D1_MARK,
+       MMC_D2_MARK, MMC_D3_MARK,
+};
+static const unsigned int mmc_data8_pins[] = {
+       /* D[0:7] */
+       RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
+       RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
+       RCAR_GP_PIN(3, 11), RCAR_GP_PIN(3, 12),
+       RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 14),
+};
+static const unsigned int mmc_data8_mux[] = {
+       MMC_D0_MARK, MMC_D1_MARK,
+       MMC_D2_MARK, MMC_D3_MARK,
+       MMC_D4_MARK, MMC_D5_MARK,
+       MMC_D6_MARK, MMC_D7_MARK,
+};
+static const unsigned int mmc_ctrl_pins[] = {
+       /* CLK, CMD */
+       RCAR_GP_PIN(3,10), RCAR_GP_PIN(3, 5),
+};
+static const unsigned int mmc_ctrl_mux[] = {
+       MMC_CLK_MARK, MMC_CMD_MARK,
+};
+static const unsigned int mmc_cd_pins[] = {
+       /* CD */
+       RCAR_GP_PIN(3, 16),
+};
+static const unsigned int mmc_cd_mux[] = {
+       MMC_CD_MARK,
+};
+static const unsigned int mmc_wp_pins[] = {
+       /* WP */
+       RCAR_GP_PIN(3, 15),
+};
+static const unsigned int mmc_wp_mux[] = {
+       MMC_WP_MARK,
+};
+
+/* - TMU -------------------------------------------------------------------- */
+static const unsigned int tmu_tclk1_a_pins[] = {
+       /* TCLK1 */
+       RCAR_GP_PIN(4, 4),
+};
+static const unsigned int tmu_tclk1_a_mux[] = {
+       TCLK1_A_MARK,
+};
+static const unsigned int tmu_tclk1_b_pins[] = {
+       /* TCLK1 */
+       RCAR_GP_PIN(1, 23),
+};
+static const unsigned int tmu_tclk1_b_mux[] = {
+       TCLK1_B_MARK,
+};
+static const unsigned int tmu_tclk2_a_pins[] = {
+       /* TCLK2 */
+       RCAR_GP_PIN(4, 5),
+};
+static const unsigned int tmu_tclk2_a_mux[] = {
+       TCLK2_A_MARK,
+};
+static const unsigned int tmu_tclk2_b_pins[] = {
+       /* TCLK2 */
+       RCAR_GP_PIN(1, 24),
+};
+static const unsigned int tmu_tclk2_b_mux[] = {
+       TCLK2_B_MARK,
+};
+
+/* - VIN0 ------------------------------------------------------------------- */
+static const unsigned int vin0_data8_pins[] = {
+       RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5),
+       RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
+       RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
+       RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
+};
+static const unsigned int vin0_data8_mux[] = {
+       VI0_DATA0_MARK, VI0_DATA1_MARK,
+       VI0_DATA2_MARK, VI0_DATA3_MARK,
+       VI0_DATA4_MARK, VI0_DATA5_MARK,
+       VI0_DATA6_MARK, VI0_DATA7_MARK,
+};
+static const unsigned int vin0_data10_pins[] = {
+       RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5),
+       RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
+       RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
+       RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
+       RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
+};
+static const unsigned int vin0_data10_mux[] = {
+       VI0_DATA0_MARK, VI0_DATA1_MARK,
+       VI0_DATA2_MARK, VI0_DATA3_MARK,
+       VI0_DATA4_MARK, VI0_DATA5_MARK,
+       VI0_DATA6_MARK, VI0_DATA7_MARK,
+       VI0_DATA8_MARK,  VI0_DATA9_MARK,
+};
+static const unsigned int vin0_data12_pins[] = {
+       RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5),
+       RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
+       RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
+       RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
+       RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
+       RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 15),
+};
+static const unsigned int vin0_data12_mux[] = {
+       VI0_DATA0_MARK, VI0_DATA1_MARK,
+       VI0_DATA2_MARK, VI0_DATA3_MARK,
+       VI0_DATA4_MARK, VI0_DATA5_MARK,
+       VI0_DATA6_MARK, VI0_DATA7_MARK,
+       VI0_DATA8_MARK,  VI0_DATA9_MARK,
+       VI0_DATA10_MARK, VI0_DATA11_MARK,
+};
+static const unsigned int vin0_sync_pins[] = {
+       /* VSYNC_N, HSYNC_N */
+       RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 2),
+};
+static const unsigned int vin0_sync_mux[] = {
+       VI0_HSYNC_N_MARK, VI0_VSYNC_N_MARK,
+};
+static const unsigned int vin0_field_pins[] = {
+       /* FIELD */
+       RCAR_GP_PIN(2, 16),
+};
+static const unsigned int vin0_field_mux[] = {
+       VI0_FIELD_MARK,
+};
+static const unsigned int vin0_clkenb_pins[] = {
+       /* CLKENB */
+       RCAR_GP_PIN(2, 1),
+};
+static const unsigned int vin0_clkenb_mux[] = {
+       VI0_CLKENB_MARK,
+};
+static const unsigned int vin0_clk_pins[] = {
+       /* CLK */
+       RCAR_GP_PIN(2, 0),
+};
+static const unsigned int vin0_clk_mux[] = {
+       VI0_CLK_MARK,
+};
+/* - VIN1 ------------------------------------------------------------------- */
+static const unsigned int vin1_data8_pins[] = {
+       RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
+       RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
+       RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
+       RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
+};
+static const unsigned int vin1_data8_mux[] = {
+       VI1_DATA0_MARK, VI1_DATA1_MARK,
+       VI1_DATA2_MARK, VI1_DATA3_MARK,
+       VI1_DATA4_MARK, VI1_DATA5_MARK,
+       VI1_DATA6_MARK, VI1_DATA7_MARK,
+};
+static const unsigned int vin1_data10_pins[] = {
+       RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
+       RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
+       RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
+       RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
+       RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13),
+};
+static const unsigned int vin1_data10_mux[] = {
+       VI1_DATA0_MARK, VI1_DATA1_MARK,
+       VI1_DATA2_MARK, VI1_DATA3_MARK,
+       VI1_DATA4_MARK, VI1_DATA5_MARK,
+       VI1_DATA6_MARK, VI1_DATA7_MARK,
+       VI1_DATA8_MARK,  VI1_DATA9_MARK,
+};
+static const unsigned int vin1_data12_pins[] = {
+       RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
+       RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
+       RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
+       RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
+       RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13),
+       RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
+};
+static const unsigned int vin1_data12_mux[] = {
+       VI1_DATA0_MARK, VI1_DATA1_MARK,
+       VI1_DATA2_MARK, VI1_DATA3_MARK,
+       VI1_DATA4_MARK, VI1_DATA5_MARK,
+       VI1_DATA6_MARK, VI1_DATA7_MARK,
+       VI1_DATA8_MARK,  VI1_DATA9_MARK,
+       VI1_DATA10_MARK, VI1_DATA11_MARK,
+};
+static const unsigned int vin1_sync_pins[] = {
+       /* VSYNC_N, HSYNC_N */
+        RCAR_GP_PIN(3, 3), RCAR_GP_PIN(3, 2),
+};
+static const unsigned int vin1_sync_mux[] = {
+       VI1_HSYNC_N_MARK, VI1_VSYNC_N_MARK,
+};
+static const unsigned int vin1_field_pins[] = {
+       /* FIELD */
+       RCAR_GP_PIN(3, 16),
+};
+static const unsigned int vin1_field_mux[] = {
+       VI1_FIELD_MARK,
+};
+static const unsigned int vin1_clkenb_pins[] = {
+       /* CLKENB */
+       RCAR_GP_PIN(3, 1),
+};
+static const unsigned int vin1_clkenb_mux[] = {
+       VI1_CLKENB_MARK,
+};
+static const unsigned int vin1_clk_pins[] = {
+       /* CLK */
+       RCAR_GP_PIN(3, 0),
+};
+static const unsigned int vin1_clk_mux[] = {
+       VI1_CLK_MARK,
+};
+
+static const struct sh_pfc_pin_group pinmux_groups[] = {
+       SH_PFC_PIN_GROUP(avb0_rx_ctrl),
+       SH_PFC_PIN_GROUP(avb0_rxc),
+       SH_PFC_PIN_GROUP(avb0_rd0),
+       SH_PFC_PIN_GROUP(avb0_rd1),
+       SH_PFC_PIN_GROUP(avb0_rd2),
+       SH_PFC_PIN_GROUP(avb0_rd3),
+       SH_PFC_PIN_GROUP(avb0_rd4),
+       SH_PFC_PIN_GROUP(avb0_tx_ctrl),
+       SH_PFC_PIN_GROUP(avb0_txc),
+       SH_PFC_PIN_GROUP(avb0_td0),
+       SH_PFC_PIN_GROUP(avb0_td1),
+       SH_PFC_PIN_GROUP(avb0_td2),
+       SH_PFC_PIN_GROUP(avb0_td3),
+       SH_PFC_PIN_GROUP(avb0_td4),
+       SH_PFC_PIN_GROUP(avb0_txcrefclk),
+       SH_PFC_PIN_GROUP(avb0_mdio),
+       SH_PFC_PIN_GROUP(avb0_mdc),
+       SH_PFC_PIN_GROUP(avb0_magic),
+       SH_PFC_PIN_GROUP(avb0_phy_int),
+       SH_PFC_PIN_GROUP(avb0_link),
+       SH_PFC_PIN_GROUP(avb0_avtp_match),
+       SH_PFC_PIN_GROUP(avb0_avtp_pps),
+       SH_PFC_PIN_GROUP(avb0_avtp_capture),
+       SH_PFC_PIN_GROUP(canfd0_data_a),
+       SH_PFC_PIN_GROUP(canfd_clk_a),
+       SH_PFC_PIN_GROUP(canfd0_data_b),
+       SH_PFC_PIN_GROUP(canfd_clk_b),
+       SH_PFC_PIN_GROUP(canfd1_data),
+       SH_PFC_PIN_GROUP(du_rgb666),
+       SH_PFC_PIN_GROUP(du_clk_out_0),
+       SH_PFC_PIN_GROUP(du_clk_out_1),
+       SH_PFC_PIN_GROUP(du_sync),
+       SH_PFC_PIN_GROUP(du_oddf),
+       SH_PFC_PIN_GROUP(du_cde),
+       SH_PFC_PIN_GROUP(du_disp),
+       SH_PFC_PIN_GROUP(hscif0_data),
+       SH_PFC_PIN_GROUP(hscif0_clk),
+       SH_PFC_PIN_GROUP(hscif0_ctrl),
+       SH_PFC_PIN_GROUP(hscif1_data),
+       SH_PFC_PIN_GROUP(hscif1_clk),
+       SH_PFC_PIN_GROUP(hscif1_ctrl),
+       SH_PFC_PIN_GROUP(hscif2_data),
+       SH_PFC_PIN_GROUP(hscif2_clk),
+       SH_PFC_PIN_GROUP(hscif2_ctrl),
+       SH_PFC_PIN_GROUP(hscif3_data),
+       SH_PFC_PIN_GROUP(hscif3_clk),
+       SH_PFC_PIN_GROUP(hscif3_ctrl),
+       SH_PFC_PIN_GROUP(scif_clk_a),
+       SH_PFC_PIN_GROUP(scif_clk_b),
+       SH_PFC_PIN_GROUP(i2c0),
+       SH_PFC_PIN_GROUP(i2c1),
+       SH_PFC_PIN_GROUP(i2c2),
+       SH_PFC_PIN_GROUP(i2c3),
+       SH_PFC_PIN_GROUP(i2c4),
+       SH_PFC_PIN_GROUP(intc_ex_irq0),
+       SH_PFC_PIN_GROUP(intc_ex_irq1),
+       SH_PFC_PIN_GROUP(intc_ex_irq2),
+       SH_PFC_PIN_GROUP(intc_ex_irq3),
+       SH_PFC_PIN_GROUP(intc_ex_irq4),
+       SH_PFC_PIN_GROUP(intc_ex_irq5),
+       SH_PFC_PIN_GROUP(msiof0_clk),
+       SH_PFC_PIN_GROUP(msiof0_sync),
+       SH_PFC_PIN_GROUP(msiof0_ss1),
+       SH_PFC_PIN_GROUP(msiof0_ss2),
+       SH_PFC_PIN_GROUP(msiof0_txd),
+       SH_PFC_PIN_GROUP(msiof0_rxd),
+       SH_PFC_PIN_GROUP(msiof1_clk),
+       SH_PFC_PIN_GROUP(msiof1_sync),
+       SH_PFC_PIN_GROUP(msiof1_ss1),
+       SH_PFC_PIN_GROUP(msiof1_ss2),
+       SH_PFC_PIN_GROUP(msiof1_txd),
+       SH_PFC_PIN_GROUP(msiof1_rxd),
+       SH_PFC_PIN_GROUP(msiof2_clk),
+       SH_PFC_PIN_GROUP(msiof2_sync),
+       SH_PFC_PIN_GROUP(msiof2_ss1),
+       SH_PFC_PIN_GROUP(msiof2_ss2),
+       SH_PFC_PIN_GROUP(msiof2_txd),
+       SH_PFC_PIN_GROUP(msiof2_rxd),
+       SH_PFC_PIN_GROUP(msiof3_clk),
+       SH_PFC_PIN_GROUP(msiof3_sync),
+       SH_PFC_PIN_GROUP(msiof3_ss1),
+       SH_PFC_PIN_GROUP(msiof3_ss2),
+       SH_PFC_PIN_GROUP(msiof3_txd),
+       SH_PFC_PIN_GROUP(msiof3_rxd),
+       SH_PFC_PIN_GROUP(pwm0_a),
+       SH_PFC_PIN_GROUP(pwm0_b),
+       SH_PFC_PIN_GROUP(pwm1_a),
+       SH_PFC_PIN_GROUP(pwm1_b),
+       SH_PFC_PIN_GROUP(pwm2_a),
+       SH_PFC_PIN_GROUP(pwm2_b),
+       SH_PFC_PIN_GROUP(pwm3_a),
+       SH_PFC_PIN_GROUP(pwm3_b),
+       SH_PFC_PIN_GROUP(pwm4_a),
+       SH_PFC_PIN_GROUP(pwm4_b),
+       SH_PFC_PIN_GROUP(scif0_data),
+       SH_PFC_PIN_GROUP(scif0_clk),
+       SH_PFC_PIN_GROUP(scif0_ctrl),
+       SH_PFC_PIN_GROUP(scif1_data_a),
+       SH_PFC_PIN_GROUP(scif1_clk),
+       SH_PFC_PIN_GROUP(scif1_ctrl),
+       SH_PFC_PIN_GROUP(scif1_data_b),
+       SH_PFC_PIN_GROUP(scif3_data),
+       SH_PFC_PIN_GROUP(scif3_clk),
+       SH_PFC_PIN_GROUP(scif3_ctrl),
+       SH_PFC_PIN_GROUP(scif4_data),
+       SH_PFC_PIN_GROUP(scif4_clk),
+       SH_PFC_PIN_GROUP(scif4_ctrl),
+       SH_PFC_PIN_GROUP(mmc_data1),
+       SH_PFC_PIN_GROUP(mmc_data4),
+       SH_PFC_PIN_GROUP(mmc_data8),
+       SH_PFC_PIN_GROUP(mmc_ctrl),
+       SH_PFC_PIN_GROUP(mmc_cd),
+       SH_PFC_PIN_GROUP(mmc_wp),
+       SH_PFC_PIN_GROUP(tmu_tclk1_a),
+       SH_PFC_PIN_GROUP(tmu_tclk1_b),
+       SH_PFC_PIN_GROUP(tmu_tclk2_a),
+       SH_PFC_PIN_GROUP(tmu_tclk2_b),
+       SH_PFC_PIN_GROUP(vin0_data8),
+       SH_PFC_PIN_GROUP(vin0_data10),
+       SH_PFC_PIN_GROUP(vin0_data12),
+       SH_PFC_PIN_GROUP(vin0_sync),
+       SH_PFC_PIN_GROUP(vin0_field),
+       SH_PFC_PIN_GROUP(vin0_clkenb),
+       SH_PFC_PIN_GROUP(vin0_clk),
+       SH_PFC_PIN_GROUP(vin1_data8),
+       SH_PFC_PIN_GROUP(vin1_data10),
+       SH_PFC_PIN_GROUP(vin1_data12),
+       SH_PFC_PIN_GROUP(vin1_sync),
+       SH_PFC_PIN_GROUP(vin1_field),
+       SH_PFC_PIN_GROUP(vin1_clkenb),
+       SH_PFC_PIN_GROUP(vin1_clk),
+};
+
+static const char * const avb0_groups[] = {
+       "avb0_rx_ctrl",
+       "avb0_rxc",
+       "avb0_rd1",
+       "avb0_rd4",
+       "avb0_tx_ctrl",
+       "avb0_txc",
+       "avb0_td1",
+       "avb0_td4",
+       "avb0_txcrefclk",
+       "avb0_mdio",
+       "avb0_mdc",
+       "avb0_magic",
+       "avb0_phy_int",
+       "avb0_link",
+       "avb0_avtp_match",
+       "avb0_avtp_pps",
+       "avb0_avtp_capture",
+};
+
+static const char * const canfd0_groups[] = {
+       "canfd0_data_a",
+       "canfd_clk_a",
+       "canfd0_data_b",
+       "canfd_clk_b",
+};
+
+static const char * const canfd1_groups[] = {
+       "canfd1_data",
+};
+
+static const char * const du_groups[] = {
+       "du_rgb666",
+       "du_clk_out_0",
+       "du_clk_out_1",
+       "du_sync",
+       "du_oddf",
+       "du_cde",
+       "du_disp",
+};
+
+static const char * const hscif0_groups[] = {
+       "hscif0_data",
+       "hscif0_clk",
+       "hscif0_ctrl",
+};
+
+static const char * const hscif1_groups[] = {
+       "hscif1_data",
+       "hscif1_clk",
+       "hscif1_ctrl",
+};
+
+static const char * const hscif2_groups[] = {
+       "hscif2_data",
+       "hscif2_clk",
+       "hscif2_ctrl",
+};
+
+static const char * const hscif3_groups[] = {
+       "hscif3_data",
+       "hscif3_clk",
+       "hscif3_ctrl",
+};
+
+static const char * const scif_clk_groups[] = {
+       "scif_clk_a",
+       "scif_clk_b",
+};
+
+static const char * const i2c0_groups[] = {
+       "i2c0",
+};
+
+static const char * const i2c1_groups[] = {
+       "i2c1",
+};
+
+static const char * const i2c2_groups[] = {
+       "i2c2",
+};
+
+static const char * const i2c3_groups[] = {
+       "i2c3",
+};
+
+static const char * const i2c4_groups[] = {
+       "i2c4",
+};
+
+static const char * const intc_ex_groups[] = {
+       "intc_ex_irq0",
+       "intc_ex_irq1",
+       "intc_ex_irq2",
+       "intc_ex_irq3",
+       "intc_ex_irq4",
+       "intc_ex_irq5",
+};
+
+static const char * const msiof0_groups[] = {
+       "msiof0_clk",
+       "msiof0_sync",
+       "msiof0_ss1",
+       "msiof0_ss2",
+       "msiof0_txd",
+       "msiof0_rxd",
+};
+
+static const char * const msiof1_groups[] = {
+       "msiof1_clk",
+       "msiof1_sync",
+       "msiof1_ss1",
+       "msiof1_ss2",
+       "msiof1_txd",
+       "msiof1_rxd",
+};
+
+static const char * const msiof2_groups[] = {
+       "msiof2_clk",
+       "msiof2_sync",
+       "msiof2_ss1",
+       "msiof2_ss2",
+       "msiof2_txd",
+       "msiof2_rxd",
+};
+
+static const char * const msiof3_groups[] = {
+       "msiof3_clk",
+       "msiof3_sync",
+       "msiof3_ss1",
+       "msiof3_ss2",
+       "msiof3_txd",
+       "msiof3_rxd",
+};
+
+static const char * const pwm0_groups[] = {
+       "pwm0_a",
+       "pwm0_b",
+};
+
+static const char * const pwm1_groups[] = {
+       "pwm1_a",
+       "pwm1_b",
+};
+
+static const char * const pwm2_groups[] = {
+       "pwm2_a",
+       "pwm2_b",
+};
+
+static const char * const pwm3_groups[] = {
+       "pwm3_a",
+       "pwm3_b",
+};
+
+static const char * const pwm4_groups[] = {
+       "pwm4_a",
+       "pwm4_b",
+};
+
+static const char * const scif0_groups[] = {
+       "scif0_data",
+//     "scif0_clk",
+//     "scif0_ctrl",
+};
+
+static const char * const scif1_groups[] = {
+       "scif1_data_a",
+       "scif1_clk",
+       "scif1_ctrl",
+       "scif1_data_b",
+};
+
+static const char * const scif3_groups[] = {
+       "scif3_data",
+       "scif3_clk",
+       "scif3_ctrl",
+};
+
+static const char * const scif4_groups[] = {
+       "scif4_data",
+       "scif4_clk",
+       "scif4_ctrl",
+};
+
+static const char * const mmc_groups[] = {
+       "mmc_data1",
+       "mmc_data4",
+       "mmc_data8",
+       "mmc_ctrl",
+       "mmc_cd",
+       "mmc_wp",
+};
+
+static const char * const tmu_groups[] = {
+       "tmu_tclk1_a",
+       "tmu_tclk1_b",
+       "tmu_tclk2_a",
+       "tmu_tclk2_b",
+};
+
+static const char * const vin0_groups[] = {
+       "vin0_data8",
+       "vin0_data10",
+       "vin0_data12",
+       "vin0_sync",
+       "vin0_field",
+       "vin0_clkenb",
+       "vin0_clk",
+};
+
+static const char * const vin1_groups[] = {
+       "vin1_data8",
+       "vin1_data10",
+       "vin1_data12",
+       "vin1_sync",
+       "vin1_field",
+       "vin1_clkenb",
+       "vin1_clk",
+};
+
+#define POCCTRL0       0x380
+#define POCCTRL1       0x384
+#define PIN2POCCTRL0_SHIFT(a) ({ \
+       int _gp = (a) >> 5; \
+       int _bit = (a) & 0x1f; \
+       ((_gp == 3) && (_bit < 17)) ? _bit + 7 : -1; \
+})
+
+
+static const struct sh_pfc_function pinmux_functions[] = {
+       SH_PFC_FUNCTION(avb0),
+       SH_PFC_FUNCTION(canfd0),
+       SH_PFC_FUNCTION(canfd1),
+       SH_PFC_FUNCTION(du),
+       SH_PFC_FUNCTION(hscif0),
+       SH_PFC_FUNCTION(hscif1),
+       SH_PFC_FUNCTION(hscif2),
+       SH_PFC_FUNCTION(hscif3),
+       SH_PFC_FUNCTION(scif_clk),
+       SH_PFC_FUNCTION(i2c0),
+       SH_PFC_FUNCTION(i2c1),
+       SH_PFC_FUNCTION(i2c2),
+       SH_PFC_FUNCTION(i2c3),
+       SH_PFC_FUNCTION(i2c4),
+       SH_PFC_FUNCTION(intc_ex),
+       SH_PFC_FUNCTION(msiof0),
+       SH_PFC_FUNCTION(msiof1),
+       SH_PFC_FUNCTION(msiof2),
+       SH_PFC_FUNCTION(msiof3),
+       SH_PFC_FUNCTION(pwm0),
+       SH_PFC_FUNCTION(pwm1),
+       SH_PFC_FUNCTION(pwm2),
+       SH_PFC_FUNCTION(pwm3),
+       SH_PFC_FUNCTION(pwm4),
+       SH_PFC_FUNCTION(scif0),
+       SH_PFC_FUNCTION(scif1),
+       SH_PFC_FUNCTION(scif3),
+       SH_PFC_FUNCTION(scif4),
+       SH_PFC_FUNCTION(mmc),
+       SH_PFC_FUNCTION(tmu),
+       SH_PFC_FUNCTION(vin0),
+       SH_PFC_FUNCTION(vin1),
+};
+
+static const struct pinmux_cfg_reg pinmux_config_regs[] = {
+#define F_(x, y)       FN_##y
+#define FM(x)          FN_##x
+       { PINMUX_CFG_REG("GPSR0", 0xe6060100, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_0_21_FN,     GPSR0_21,
+               GP_0_20_FN,     GPSR0_20,
+               GP_0_19_FN,     GPSR0_19,
+               GP_0_18_FN,     GPSR0_18,
+               GP_0_17_FN,     GPSR0_17,
+               GP_0_16_FN,     GPSR0_16,
+               GP_0_15_FN,     GPSR0_15,
+               GP_0_14_FN,     GPSR0_14,
+               GP_0_13_FN,     GPSR0_13,
+               GP_0_12_FN,     GPSR0_12,
+               GP_0_11_FN,     GPSR0_11,
+               GP_0_10_FN,     GPSR0_10,
+               GP_0_9_FN,      GPSR0_9,
+               GP_0_8_FN,      GPSR0_8,
+               GP_0_7_FN,      GPSR0_7,
+               GP_0_6_FN,      GPSR0_6,
+               GP_0_5_FN,      GPSR0_5,
+               GP_0_4_FN,      GPSR0_4,
+               GP_0_3_FN,      GPSR0_3,
+               GP_0_2_FN,      GPSR0_2,
+               GP_0_1_FN,      GPSR0_1,
+               GP_0_0_FN,      GPSR0_0, }
+       },
+       { PINMUX_CFG_REG("GPSR1", 0xe6060104, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_1_27_FN,     GPSR1_27,
+               GP_1_26_FN,     GPSR1_26,
+               GP_1_25_FN,     GPSR1_25,
+               GP_1_24_FN,     GPSR1_24,
+               GP_1_23_FN,     GPSR1_23,
+               GP_1_22_FN,     GPSR1_22,
+               GP_1_21_FN,     GPSR1_21,
+               GP_1_20_FN,     GPSR1_20,
+               GP_1_19_FN,     GPSR1_19,
+               GP_1_18_FN,     GPSR1_18,
+               GP_1_17_FN,     GPSR1_17,
+               GP_1_16_FN,     GPSR1_16,
+               GP_1_15_FN,     GPSR1_15,
+               GP_1_14_FN,     GPSR1_14,
+               GP_1_13_FN,     GPSR1_13,
+               GP_1_12_FN,     GPSR1_12,
+               GP_1_11_FN,     GPSR1_11,
+               GP_1_10_FN,     GPSR1_10,
+               GP_1_9_FN,      GPSR1_9,
+               GP_1_8_FN,      GPSR1_8,
+               GP_1_7_FN,      GPSR1_7,
+               GP_1_6_FN,      GPSR1_6,
+               GP_1_5_FN,      GPSR1_5,
+               GP_1_4_FN,      GPSR1_4,
+               GP_1_3_FN,      GPSR1_3,
+               GP_1_2_FN,      GPSR1_2,
+               GP_1_1_FN,      GPSR1_1,
+               GP_1_0_FN,      GPSR1_0, }
+       },
+       { PINMUX_CFG_REG("GPSR2", 0xe6060108, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_2_16_FN,     GPSR2_16,
+               GP_2_15_FN,     GPSR2_15,
+               GP_2_14_FN,     GPSR2_14,
+               GP_2_13_FN,     GPSR2_13,
+               GP_2_12_FN,     GPSR2_12,
+               GP_2_11_FN,     GPSR2_11,
+               GP_2_10_FN,     GPSR2_10,
+               GP_2_9_FN,      GPSR2_9,
+               GP_2_8_FN,      GPSR2_8,
+               GP_2_7_FN,      GPSR2_7,
+               GP_2_6_FN,      GPSR2_6,
+               GP_2_5_FN,      GPSR2_5,
+               GP_2_4_FN,      GPSR2_4,
+               GP_2_3_FN,      GPSR2_3,
+               GP_2_2_FN,      GPSR2_2,
+               GP_2_1_FN,      GPSR2_1,
+               GP_2_0_FN,      GPSR2_0, }
+       },
+       { PINMUX_CFG_REG("GPSR3", 0xe606010c, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_3_16_FN,     GPSR3_16,
+               GP_3_15_FN,     GPSR3_15,
+               GP_3_14_FN,     GPSR3_14,
+               GP_3_13_FN,     GPSR3_13,
+               GP_3_12_FN,     GPSR3_12,
+               GP_3_11_FN,     GPSR3_11,
+               GP_3_10_FN,     GPSR3_10,
+               GP_3_9_FN,      GPSR3_9,
+               GP_3_8_FN,      GPSR3_8,
+               GP_3_7_FN,      GPSR3_7,
+               GP_3_6_FN,      GPSR3_6,
+               GP_3_5_FN,      GPSR3_5,
+               GP_3_4_FN,      GPSR3_4,
+               GP_3_3_FN,      GPSR3_3,
+               GP_3_2_FN,      GPSR3_2,
+               GP_3_1_FN,      GPSR3_1,
+               GP_3_0_FN,      GPSR3_0, }
+       },
+       { PINMUX_CFG_REG("GPSR4", 0xe6060110, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_4_5_FN,      GPSR4_5,
+               GP_4_4_FN,      GPSR4_4,
+               GP_4_3_FN,      GPSR4_3,
+               GP_4_2_FN,      GPSR4_2,
+               GP_4_1_FN,      GPSR4_1,
+               GP_4_0_FN,      GPSR4_0, }
+       },
+       { PINMUX_CFG_REG("GPSR5", 0xe6060114, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_5_14_FN,     GPSR5_14,
+               GP_5_13_FN,     GPSR5_13,
+               GP_5_12_FN,     GPSR5_12,
+               GP_5_11_FN,     GPSR5_11,
+               GP_5_10_FN,     GPSR5_10,
+               GP_5_9_FN,      GPSR5_9,
+               GP_5_8_FN,      GPSR5_8,
+               GP_5_7_FN,      GPSR5_7,
+               GP_5_6_FN,      GPSR5_6,
+               GP_5_5_FN,      GPSR5_5,
+               GP_5_4_FN,      GPSR5_4,
+               GP_5_3_FN,      GPSR5_3,
+               GP_5_2_FN,      GPSR5_2,
+               GP_5_1_FN,      GPSR5_1,
+               GP_5_0_FN,      GPSR5_0, }
+       },
+#undef F_
+#undef FM
+
+#define F_(x, y)       x,
+#define FM(x)          FN_##x,
+       { PINMUX_CFG_REG("IPSR0", 0xe6060200, 32, 4) {
+               IP0_31_28
+               IP0_27_24
+               IP0_23_20
+               IP0_19_16
+               IP0_15_12
+               IP0_11_8
+               IP0_7_4
+               IP0_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR1", 0xe6060204, 32, 4) {
+               IP1_31_28
+               IP1_27_24
+               IP1_23_20
+               IP1_19_16
+               IP1_15_12
+               IP1_11_8
+               IP1_7_4
+               IP1_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR2", 0xe6060208, 32, 4) {
+               IP2_31_28
+               IP2_27_24
+               IP2_23_20
+               IP2_19_16
+               IP2_15_12
+               IP2_11_8
+               IP2_7_4
+               IP2_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR3", 0xe606020c, 32, 4) {
+               IP3_31_28
+               IP3_27_24
+               IP3_23_20
+               IP3_19_16
+               IP3_15_12
+               IP3_11_8
+               IP3_7_4
+               IP3_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR4", 0xe6060210, 32, 4) {
+               IP4_31_28
+               IP4_27_24
+               IP4_23_20
+               IP4_19_16
+               IP4_15_12
+               IP4_11_8
+               IP4_7_4
+               IP4_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR5", 0xe6060214, 32, 4) {
+               IP5_31_28
+               IP5_27_24
+               IP5_23_20
+               IP5_19_16
+               IP5_15_12
+               IP5_11_8
+               IP5_7_4
+               IP5_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR6", 0xe6060218, 32, 4) {
+               IP6_31_28
+               IP6_27_24
+               IP6_23_20
+               IP6_19_16
+               IP6_15_12
+               IP6_11_8
+               IP6_7_4
+               IP6_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR7", 0xe606021c, 32, 4) {
+               IP7_31_28
+               IP7_27_24
+               IP7_23_20
+               IP7_19_16
+               IP7_15_12
+               IP7_11_8
+               IP7_7_4
+               IP7_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR8", 0xe6060220, 32, 4) {
+               IP8_31_28
+               IP8_27_24
+               IP8_23_20
+               IP8_19_16
+               IP8_15_12
+               IP8_11_8
+               IP8_7_4
+               IP8_3_0 }
+       },
+#undef F_
+#undef FM
+
+#define F_(x, y)       x,
+#define FM(x)          FN_##x,
+       { PINMUX_CFG_REG("MOD_SEL0", 0xe6060500, 32, 1) {
+               /* RESERVED 31..12 */
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               MOD_SEL0_11
+               MOD_SEL0_10
+               MOD_SEL0_9
+               MOD_SEL0_8
+               MOD_SEL0_7
+               MOD_SEL0_6
+               MOD_SEL0_5
+               MOD_SEL0_4
+               MOD_SEL0_3
+               MOD_SEL0_2
+               MOD_SEL0_1
+               MOD_SEL0_0 }
+       },
+       { },
+};
+
+static int r8a77970_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *pocctrl)
+{
+       int bit = -EINVAL;
+
+       *pocctrl = 0xe6060384;
+
+       if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 16))
+               bit = (pin & 0x1f) + 7;
+
+       return bit;
+}
+
+static const struct sh_pfc_soc_operations pinmux_ops = {
+       .pin_to_pocctrl = r8a77970_pin_to_pocctrl,
+};
+
+const struct sh_pfc_soc_info r8a77970_pinmux_info = {
+       .name = "r8a77970_pfc",
+       .ops = &pinmux_ops,
+       .unlock_reg = 0xe6060000, /* PMMR */
+
+       .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
+
+       .pins = pinmux_pins,
+       .nr_pins = ARRAY_SIZE(pinmux_pins),
+       .groups = pinmux_groups,
+       .nr_groups = ARRAY_SIZE(pinmux_groups),
+       .functions = pinmux_functions,
+       .nr_functions = ARRAY_SIZE(pinmux_functions),
+
+       .cfg_regs = pinmux_config_regs,
+
+       .pinmux_data = pinmux_data,
+       .pinmux_data_size = ARRAY_SIZE(pinmux_data),
+};
diff --git a/drivers/pinctrl/renesas/pfc-r8a77995.c b/drivers/pinctrl/renesas/pfc-r8a77995.c
new file mode 100644 (file)
index 0000000..3bd8669
--- /dev/null
@@ -0,0 +1,1813 @@
+/*
+ * R8A77995 processor support - PFC hardware block.
+ *
+ * Copyright (C) 2017 Renesas Electronics Corp.
+ *
+ * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7796.c
+ *
+ * R-Car Gen3 processor support - PFC hardware block.
+ *
+ * Copyright (C) 2015  Renesas Electronics Corporation
+ *
+ * SPDX-License-Identifier:    GPL-2.0
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <dm/pinctrl.h>
+#include <linux/kernel.h>
+
+#include "sh_pfc.h"
+
+#define CPU_ALL_PORT(fn, sfx)                  \
+               PORT_GP_9(0,  fn, sfx),         \
+               PORT_GP_32(1, fn, sfx),         \
+               PORT_GP_32(2, fn, sfx),         \
+               PORT_GP_CFG_10(3,  fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \
+               PORT_GP_32(4, fn, sfx),         \
+               PORT_GP_21(5, fn, sfx),         \
+               PORT_GP_14(6, fn, sfx)
+
+/*
+ * F_() : just information
+ * FM() : macro for FN_xxx / xxx_MARK
+ */
+
+/* GPSR0 */
+#define GPSR0_8                F_(MLB_SIG,             IP0_27_24)
+#define GPSR0_7                F_(MLB_DAT,             IP0_23_20)
+#define GPSR0_6                F_(MLB_CLK,             IP0_19_16)
+#define GPSR0_5                F_(MSIOF2_RXD,          IP0_15_12)
+#define GPSR0_4                F_(MSIOF2_TXD,          IP0_11_8)
+#define GPSR0_3                F_(MSIOF2_SCK,          IP0_7_4)
+#define GPSR0_2                F_(IRQ0_A,              IP0_3_0)
+#define GPSR0_1                FM(USB0_OVC)
+#define GPSR0_0                FM(USB0_PWEN)
+
+/* GPSR1 */
+#define GPSR1_31       F_(QPOLB,               IP4_27_24)
+#define GPSR1_30       F_(QPOLA,               IP4_23_20)
+#define GPSR1_29       F_(DU_CDE,              IP4_19_16)
+#define GPSR1_28       F_(DU_DISP_CDE,         IP4_15_12)
+#define GPSR1_27       F_(DU_DISP,             IP4_11_8)
+#define GPSR1_26       F_(DU_VSYNC,            IP4_7_4)
+#define GPSR1_25       F_(DU_HSYNC,            IP4_3_0)
+#define GPSR1_24       F_(DU_DOTCLKOUT0,       IP3_31_28)
+#define GPSR1_23       F_(DU_DR7,              IP3_27_24)
+#define GPSR1_22       F_(DU_DR6,              IP3_23_20)
+#define GPSR1_21       F_(DU_DR5,              IP3_19_16)
+#define GPSR1_20       F_(DU_DR4,              IP3_15_12)
+#define GPSR1_19       F_(DU_DR3,              IP3_11_8)
+#define GPSR1_18       F_(DU_DR2,              IP3_7_4)
+#define GPSR1_17       F_(DU_DR1,              IP3_3_0)
+#define GPSR1_16       F_(DU_DR0,              IP2_31_28)
+#define GPSR1_15       F_(DU_DG7,              IP2_27_24)
+#define GPSR1_14       F_(DU_DG6,              IP2_23_20)
+#define GPSR1_13       F_(DU_DG5,              IP2_19_16)
+#define GPSR1_12       F_(DU_DG4,              IP2_15_12)
+#define GPSR1_11       F_(DU_DG3,              IP2_11_8)
+#define GPSR1_10       F_(DU_DG2,              IP2_7_4)
+#define GPSR1_9                F_(DU_DG1,              IP2_3_0)
+#define GPSR1_8                F_(DU_DG0,              IP1_31_28)
+#define GPSR1_7                F_(DU_DB7,              IP1_27_24)
+#define GPSR1_6                F_(DU_DB6,              IP1_23_20)
+#define GPSR1_5                F_(DU_DB5,              IP1_19_16)
+#define GPSR1_4                F_(DU_DB4,              IP1_15_12)
+#define GPSR1_3                F_(DU_DB3,              IP1_11_8)
+#define GPSR1_2                F_(DU_DB2,              IP1_7_4)
+#define GPSR1_1                F_(DU_DB1,              IP1_3_0)
+#define GPSR1_0                F_(DU_DB0,              IP0_31_28)
+
+/* GPSR2 */
+#define GPSR2_31       F_(NFCE_N,              IP8_19_16)
+#define GPSR2_30       F_(NFCLE,               IP8_15_12)
+#define GPSR2_29       F_(NFALE,               IP8_11_8)
+#define GPSR2_28       F_(VI4_CLKENB,          IP8_7_4)
+#define GPSR2_27       F_(VI4_FIELD,           IP8_3_0)
+#define GPSR2_26       F_(VI4_HSYNC_N,         IP7_31_28)
+#define GPSR2_25       F_(VI4_VSYNC_N,         IP7_27_24)
+#define GPSR2_24       F_(VI4_DATA23,          IP7_23_20)
+#define GPSR2_23       F_(VI4_DATA22,          IP7_19_16)
+#define GPSR2_22       F_(VI4_DATA21,          IP7_15_12)
+#define GPSR2_21       F_(VI4_DATA20,          IP7_11_8)
+#define GPSR2_20       F_(VI4_DATA19,          IP7_7_4)
+#define GPSR2_19       F_(VI4_DATA18,          IP7_3_0)
+#define GPSR2_18       F_(VI4_DATA17,          IP6_31_28)
+#define GPSR2_17       F_(VI4_DATA16,          IP6_27_24)
+#define GPSR2_16       F_(VI4_DATA15,          IP6_23_20)
+#define GPSR2_15       F_(VI4_DATA14,          IP6_19_16)
+#define GPSR2_14       F_(VI4_DATA13,          IP6_15_12)
+#define GPSR2_13       F_(VI4_DATA12,          IP6_11_8)
+#define GPSR2_12       F_(VI4_DATA11,          IP6_7_4)
+#define GPSR2_11       F_(VI4_DATA10,          IP6_3_0)
+#define GPSR2_10       F_(VI4_DATA9,           IP5_31_28)
+#define GPSR2_9                F_(VI4_DATA8,           IP5_27_24)
+#define GPSR2_8                F_(VI4_DATA7,           IP5_23_20)
+#define GPSR2_7                F_(VI4_DATA6,           IP5_19_16)
+#define GPSR2_6                F_(VI4_DATA5,           IP5_15_12)
+#define GPSR2_5                FM(VI4_DATA4)
+#define GPSR2_4                F_(VI4_DATA3,           IP5_11_8)
+#define GPSR2_3                F_(VI4_DATA2,           IP5_7_4)
+#define GPSR2_2                F_(VI4_DATA1,           IP5_3_0)
+#define GPSR2_1                F_(VI4_DATA0,           IP4_31_28)
+#define GPSR2_0                FM(VI4_CLK)
+
+/* GPSR3 */
+#define GPSR3_9                F_(NFDATA7,             IP9_31_28)
+#define GPSR3_8                F_(NFDATA6,             IP9_27_24)
+#define GPSR3_7                F_(NFDATA5,             IP9_23_20)
+#define GPSR3_6                F_(NFDATA4,             IP9_19_16)
+#define GPSR3_5                F_(NFDATA3,             IP9_15_12)
+#define GPSR3_4                F_(NFDATA2,             IP9_11_8)
+#define GPSR3_3                F_(NFDATA1,             IP9_7_4)
+#define GPSR3_2                F_(NFDATA0,             IP9_3_0)
+#define GPSR3_1                F_(NFWE_N,              IP8_31_28)
+#define GPSR3_0                F_(NFRE_N,              IP8_27_24)
+
+/* GPSR4 */
+#define GPSR4_31       F_(CAN0_RX_A,           IP12_27_24)
+#define GPSR4_30       F_(CAN1_TX_A,           IP13_7_4)
+#define GPSR4_29       F_(CAN1_RX_A,           IP13_3_0)
+#define GPSR4_28       F_(CAN0_TX_A,           IP12_31_28)
+#define GPSR4_27       FM(TX2)
+#define GPSR4_26       FM(RX2)
+#define GPSR4_25       F_(SCK2,                IP12_11_8)
+#define GPSR4_24       F_(TX1_A,               IP12_7_4)
+#define GPSR4_23       F_(RX1_A,               IP12_3_0)
+#define GPSR4_22       F_(SCK1_A,              IP11_31_28)
+#define GPSR4_21       F_(TX0_A,               IP11_27_24)
+#define GPSR4_20       F_(RX0_A,               IP11_23_20)
+#define GPSR4_19       F_(SCK0_A,              IP11_19_16)
+#define GPSR4_18       F_(MSIOF1_RXD,          IP11_15_12)
+#define GPSR4_17       F_(MSIOF1_TXD,          IP11_11_8)
+#define GPSR4_16       F_(MSIOF1_SCK,          IP11_7_4)
+#define GPSR4_15       FM(MSIOF0_RXD)
+#define GPSR4_14       FM(MSIOF0_TXD)
+#define GPSR4_13       FM(MSIOF0_SYNC)
+#define GPSR4_12       FM(MSIOF0_SCK)
+#define GPSR4_11       F_(SDA1,                IP11_3_0)
+#define GPSR4_10       F_(SCL1,                IP10_31_28)
+#define GPSR4_9                FM(SDA0)
+#define GPSR4_8                FM(SCL0)
+#define GPSR4_7                F_(SSI_WS4_A,           IP10_27_24)
+#define GPSR4_6                F_(SSI_SDATA4_A,        IP10_23_20)
+#define GPSR4_5                F_(SSI_SCK4_A,          IP10_19_16)
+#define GPSR4_4                F_(SSI_WS34,            IP10_15_12)
+#define GPSR4_3                F_(SSI_SDATA3,          IP10_11_8)
+#define GPSR4_2                F_(SSI_SCK34,           IP10_7_4)
+#define GPSR4_1                F_(AUDIO_CLKA,          IP10_3_0)
+#define GPSR4_0                F_(NFRB_N,              IP8_23_20)
+
+/* GPSR5 */
+#define GPSR5_20       FM(AVB0_LINK)
+#define GPSR5_19       FM(AVB0_PHY_INT)
+#define GPSR5_18       FM(AVB0_MAGIC)
+#define GPSR5_17       FM(AVB0_MDC)
+#define GPSR5_16       FM(AVB0_MDIO)
+#define GPSR5_15       FM(AVB0_TXCREFCLK)
+#define GPSR5_14       FM(AVB0_TD3)
+#define GPSR5_13       FM(AVB0_TD2)
+#define GPSR5_12       FM(AVB0_TD1)
+#define GPSR5_11       FM(AVB0_TD0)
+#define GPSR5_10       FM(AVB0_TXC)
+#define GPSR5_9                FM(AVB0_TX_CTL)
+#define GPSR5_8                FM(AVB0_RD3)
+#define GPSR5_7                FM(AVB0_RD2)
+#define GPSR5_6                FM(AVB0_RD1)
+#define GPSR5_5                FM(AVB0_RD0)
+#define GPSR5_4                FM(AVB0_RXC)
+#define GPSR5_3                FM(AVB0_RX_CTL)
+#define GPSR5_2                F_(CAN_CLK,             IP12_23_20)
+#define GPSR5_1                F_(TPU0TO1_A,           IP12_19_16)
+#define GPSR5_0                F_(TPU0TO0_A,           IP12_15_12)
+
+/* GPSR6 */
+#define GPSR6_13       FM(RPC_INT_N)
+#define GPSR6_12       FM(RPC_RESET_N)
+#define GPSR6_11       FM(QSPI1_SSL)
+#define GPSR6_10       FM(QSPI1_IO3)
+#define GPSR6_9                FM(QSPI1_IO2)
+#define GPSR6_8                FM(QSPI1_MISO_IO1)
+#define GPSR6_7                FM(QSPI1_MOSI_IO0)
+#define GPSR6_6                FM(QSPI1_SPCLK)
+#define GPSR6_5                FM(QSPI0_SSL)
+#define GPSR6_4                FM(QSPI0_IO3)
+#define GPSR6_3                FM(QSPI0_IO2)
+#define GPSR6_2                FM(QSPI0_MISO_IO1)
+#define GPSR6_1                FM(QSPI0_MOSI_IO0)
+#define GPSR6_0                FM(QSPI0_SPCLK)
+
+/* IPSRx */            /* 0 */                 /* 1 */                 /* 2 */                 /* 3 */         /* 4 */                 /* 5 */         /* 6  - F */
+#define IP0_3_0                FM(IRQ0_A)              FM(MSIOF2_SYNC_B)       FM(USB0_IDIN)           F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP0_7_4                FM(MSIOF2_SCK)          F_(0, 0)                FM(USB0_IDPU)           F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP0_11_8       FM(MSIOF2_TXD)          FM(SCL3_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP0_15_12      FM(MSIOF2_RXD)          FM(SDA3_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP0_19_16      FM(MLB_CLK)             FM(MSIOF2_SYNC_A)       FM(SCK5_A)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP0_23_20      FM(MLB_DAT)             FM(MSIOF2_SS1)          FM(RX5_A)               FM(SCL3_B)      F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP0_27_24      FM(MLB_SIG)             FM(MSIOF2_SS2)          FM(TX5_A)               FM(SDA3_B)      F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP0_31_28      FM(DU_DB0)              FM(LCDOUT0)             FM(MSIOF3_TXD_B)        F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP1_3_0                FM(DU_DB1)              FM(LCDOUT1)             FM(MSIOF3_RXD_B)        F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP1_7_4                FM(DU_DB2)              FM(LCDOUT2)             FM(IRQ0_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP1_11_8       FM(DU_DB3)              FM(LCDOUT3)             FM(SCK5_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP1_15_12      FM(DU_DB4)              FM(LCDOUT4)             FM(RX5_B)               F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP1_19_16      FM(DU_DB5)              FM(LCDOUT5)             FM(TX5_B)               F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP1_23_20      FM(DU_DB6)              FM(LCDOUT6)             FM(MSIOF3_SS1_B)        F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP1_27_24      FM(DU_DB7)              FM(LCDOUT7)             FM(MSIOF3_SS2_B)        F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP1_31_28      FM(DU_DG0)              FM(LCDOUT8)             FM(MSIOF3_SCK_B)        F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP2_3_0                FM(DU_DG1)              FM(LCDOUT9)             FM(MSIOF3_SYNC_B)       F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP2_7_4                FM(DU_DG2)              FM(LCDOUT10)            F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP2_11_8       FM(DU_DG3)              FM(LCDOUT11)            FM(IRQ1_A)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP2_15_12      FM(DU_DG4)              FM(LCDOUT12)            FM(HSCK3_B)             F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP2_19_16      FM(DU_DG5)              FM(LCDOUT13)            FM(HTX3_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP2_23_20      FM(DU_DG6)              FM(LCDOUT14)            FM(HRX3_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP2_27_24      FM(DU_DG7)              FM(LCDOUT15)            FM(SCK4_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP2_31_28      FM(DU_DR0)              FM(LCDOUT16)            FM(RX4_B)               F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP3_3_0                FM(DU_DR1)              FM(LCDOUT17)            FM(TX4_B)               F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP3_7_4                FM(DU_DR2)              FM(LCDOUT18)            FM(PWM0_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP3_11_8       FM(DU_DR3)              FM(LCDOUT19)            FM(PWM1_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP3_15_12      FM(DU_DR4)              FM(LCDOUT20)            FM(TCLK2_B)             F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP3_19_16      FM(DU_DR5)              FM(LCDOUT21)            FM(NMI)                 F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP3_23_20      FM(DU_DR6)              FM(LCDOUT22)            FM(PWM2_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP3_27_24      FM(DU_DR7)              FM(LCDOUT23)            FM(TCLK1_B)             F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP3_31_28      FM(DU_DOTCLKOUT0)       FM(QCLK)                F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+
+/* IPSRx */            /* 0 */                 /* 1 */                 /* 2 */                 /* 3 */         /* 4 */                 /* 5 */         /* 6  - F */
+#define IP4_3_0                FM(DU_HSYNC)            FM(QSTH_QHS)            FM(IRQ3_A)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP4_7_4                FM(DU_VSYNC)            FM(QSTVA_QVS)           FM(IRQ4_A)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP4_11_8       FM(DU_DISP)             FM(QSTVB_QVE)           FM(PWM3_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP4_15_12      FM(DU_DISP_CDE)         FM(QCPV_QDE)            FM(IRQ2_B)              FM(DU_DOTCLKIN1)F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP4_19_16      FM(DU_CDE)              FM(QSTB_QHE)            FM(SCK3_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP4_23_20      FM(QPOLA)               F_(0, 0)                FM(RX3_B)               F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP4_27_24      FM(QPOLB)               F_(0, 0)                FM(TX3_B)               F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP4_31_28      FM(VI4_DATA0)           FM(PWM0_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP5_3_0                FM(VI4_DATA1)           FM(PWM1_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP5_7_4                FM(VI4_DATA2)           FM(PWM2_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP5_11_8       FM(VI4_DATA3)           FM(PWM3_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP5_15_12      FM(VI4_DATA5)           FM(SCK4_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP5_19_16      FM(VI4_DATA6)           FM(IRQ2_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP5_23_20      FM(VI4_DATA7)           FM(TCLK2_A)             F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP5_27_24      FM(VI4_DATA8)           F_(0, 0)                F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP5_31_28      FM(VI4_DATA9)           FM(MSIOF3_SS2_A)        FM(IRQ1_B)              F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP6_3_0                FM(VI4_DATA10)          FM(RX4_A)               F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP6_7_4                FM(VI4_DATA11)          FM(TX4_A)               F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP6_11_8       FM(VI4_DATA12)          FM(TCLK1_A)             F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP6_15_12      FM(VI4_DATA13)          FM(MSIOF3_SS1_A)        FM(HCTS3_N)             F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP6_19_16      FM(VI4_DATA14)          FM(SSI_SCK4_B)          FM(HRTS3_N)             F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP6_23_20      FM(VI4_DATA15)          FM(SSI_SDATA4_B)        F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP6_27_24      FM(VI4_DATA16)          FM(HRX3_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP6_31_28      FM(VI4_DATA17)          FM(HTX3_A)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP7_3_0                FM(VI4_DATA18)          FM(HSCK3_A)             F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP7_7_4                FM(VI4_DATA19)          FM(SSI_WS4_B)           F_(0, 0)                F_(0, 0)        FM(NFDATA15)            F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP7_11_8       FM(VI4_DATA20)          FM(MSIOF3_SYNC_A)       F_(0, 0)                F_(0, 0)        FM(NFDATA14)            F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP7_15_12      FM(VI4_DATA21)          FM(MSIOF3_TXD_A)        F_(0, 0)                F_(0, 0)        FM(NFDATA13)            F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP7_19_16      FM(VI4_DATA22)          FM(MSIOF3_RXD_A)        F_(0, 0)                F_(0, 0)        FM(NFDATA12)            F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP7_23_20      FM(VI4_DATA23)          FM(MSIOF3_SCK_A)        F_(0, 0)                F_(0, 0)        FM(NFDATA11)            F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP7_27_24      FM(VI4_VSYNC_N)         FM(SCK1_B)              F_(0, 0)                F_(0, 0)        FM(NFDATA10)            F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP7_31_28      FM(VI4_HSYNC_N)         FM(RX1_B)               F_(0, 0)                F_(0, 0)        FM(NFDATA9)             F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+
+/* IPSRx */            /* 0 */                 /* 1 */                 /* 2 */                 /* 3 */         /* 4 */                 /* 5 */         /* 6  - F */
+#define IP8_3_0                FM(VI4_FIELD)           FM(AUDIO_CLKB)          FM(IRQ5_A)              FM(SCIF_CLK)    FM(NFDATA8)             F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP8_7_4                FM(VI4_CLKENB)          FM(TX1_B)               F_(0, 0)                F_(0, 0)        FM(NFWP_N)              FM(DVC_MUTE_A)  F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP8_11_8       FM(NFALE)               FM(SCL2_B)              FM(IRQ3_B)              FM(PWM0_C)      F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP8_15_12      FM(NFCLE)               FM(SDA2_B)              FM(SCK3_A)              FM(PWM1_C)      F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP8_19_16      FM(NFCE_N)              F_(0, 0)                FM(RX3_A)               FM(PWM2_C)      F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP8_23_20      FM(NFRB_N)              F_(0, 0)                FM(TX3_A)               FM(PWM3_C)      F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP8_27_24      FM(NFRE_N)              FM(MMC_CMD)             F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP8_31_28      FM(NFWE_N)              FM(MMC_CLK)             F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP9_3_0                FM(NFDATA0)             FM(MMC_D0)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP9_7_4                FM(NFDATA1)             FM(MMC_D1)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP9_11_8       FM(NFDATA2)             FM(MMC_D2)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP9_15_12      FM(NFDATA3)             FM(MMC_D3)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP9_19_16      FM(NFDATA4)             FM(MMC_D4)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP9_23_20      FM(NFDATA5)             FM(MMC_D5)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP9_27_24      FM(NFDATA6)             FM(MMC_D6)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP9_31_28      FM(NFDATA7)             FM(MMC_D7)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP10_3_0       FM(AUDIO_CLKA)          F_(0, 0)                F_(0, 0)                F_(0, 0)        F_(0, 0)                FM(DVC_MUTE_B)  F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP10_7_4       FM(SSI_SCK34)           FM(FSO_CFE_0_N_A)       F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP10_11_8      FM(SSI_SDATA3)          FM(FSO_CFE_1_N_A)       F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP10_15_12     FM(SSI_WS34)            FM(FSO_TOE_N_A)         F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP10_19_16     FM(SSI_SCK4_A)          FM(HSCK0)               FM(AUDIO_CLKOUT)        FM(CAN0_RX_B)   FM(IRQ4_B)              F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP10_23_20     FM(SSI_SDATA4_A)        FM(HTX0)                FM(SCL2_A)              FM(CAN1_RX_B)   F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP10_27_24     FM(SSI_WS4_A)           FM(HRX0)                FM(SDA2_A)              FM(CAN1_TX_B)   F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP10_31_28     FM(SCL1)                FM(CTS1_N)              F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP11_3_0       FM(SDA1)                FM(RTS1_N_TANS)         F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP11_7_4       FM(MSIOF1_SCK)          FM(AVB0_AVTP_PPS_B)     F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP11_11_8      FM(MSIOF1_TXD)          FM(AVB0_AVTP_CAPTURE_B) F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP11_15_12     FM(MSIOF1_RXD)          FM(AVB0_AVTP_MATCH_B)   F_(0, 0)                F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP11_19_16     FM(SCK0_A)              FM(MSIOF1_SYNC)         FM(FSO_CFE_0_N_B)       F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP11_23_20     FM(RX0_A)               FM(MSIOF0_SS1)          FM(FSO_CFE_1_N_B)       F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP11_27_24     FM(TX0_A)               FM(MSIOF0_SS2)          FM(FSO_TOE_N_B)         F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP11_31_28     FM(SCK1_A)              FM(MSIOF1_SS2)          FM(TPU0TO2_B)           FM(CAN0_TX_B)   FM(AUDIO_CLKOUT1)       F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+
+/* IPSRx */            /* 0 */                 /* 1 */                 /* 2 */                 /* 3 */         /* 4 */                 /* 5 */         /* 6  - F */
+#define IP12_3_0       FM(RX1_A)               FM(CTS0_N)              FM(TPU0TO0_B)           F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP12_7_4       FM(TX1_A)               FM(RTS0_N_TANS)         FM(TPU0TO1_B)           F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP12_11_8      FM(SCK2)                FM(MSIOF1_SS1)          FM(TPU0TO3_B)           F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP12_15_12     FM(TPU0TO0_A)           FM(AVB0_AVTP_CAPTURE_A) FM(HCTS0_N)             F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP12_19_16     FM(TPU0TO1_A)           FM(AVB0_AVTP_MATCH_A)   FM(HRTS0_N)             F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP12_23_20     FM(CAN_CLK)             FM(AVB0_AVTP_PPS_A)     FM(SCK0_B)              FM(IRQ5_B)      F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP12_27_24     FM(CAN0_RX_A)           FM(CANFD0_RX)           FM(RX0_B)               F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP12_31_28     FM(CAN0_TX_A)           FM(CANFD0_TX)           FM(TX0_B)               F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP13_3_0       FM(CAN1_RX_A)           FM(CANFD1_RX)           FM(TPU0TO2_A)           F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+#define IP13_7_4       FM(CAN1_TX_A)           FM(CANFD1_TX)           FM(TPU0TO3_A)           F_(0, 0)        F_(0, 0)                F_(0, 0)        F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
+
+#define PINMUX_GPSR    \
+\
+               GPSR1_31        GPSR2_31                        GPSR4_31                 \
+               GPSR1_30        GPSR2_30                        GPSR4_30                 \
+               GPSR1_29        GPSR2_29                        GPSR4_29                 \
+               GPSR1_28        GPSR2_28                        GPSR4_28                 \
+               GPSR1_27        GPSR2_27                        GPSR4_27                 \
+               GPSR1_26        GPSR2_26                        GPSR4_26                 \
+               GPSR1_25        GPSR2_25                        GPSR4_25                 \
+               GPSR1_24        GPSR2_24                        GPSR4_24                 \
+               GPSR1_23        GPSR2_23                        GPSR4_23                 \
+               GPSR1_22        GPSR2_22                        GPSR4_22                 \
+               GPSR1_21        GPSR2_21                        GPSR4_21                 \
+               GPSR1_20        GPSR2_20                        GPSR4_20        GPSR5_20 \
+               GPSR1_19        GPSR2_19                        GPSR4_19        GPSR5_19 \
+               GPSR1_18        GPSR2_18                        GPSR4_18        GPSR5_18 \
+               GPSR1_17        GPSR2_17                        GPSR4_17        GPSR5_17 \
+               GPSR1_16        GPSR2_16                        GPSR4_16        GPSR5_16 \
+               GPSR1_15        GPSR2_15                        GPSR4_15        GPSR5_15 \
+               GPSR1_14        GPSR2_14                        GPSR4_14        GPSR5_14 \
+               GPSR1_13        GPSR2_13                        GPSR4_13        GPSR5_13        GPSR6_13 \
+               GPSR1_12        GPSR2_12                        GPSR4_12        GPSR5_12        GPSR6_12 \
+               GPSR1_11        GPSR2_11                        GPSR4_11        GPSR5_11        GPSR6_11 \
+               GPSR1_10        GPSR2_10                        GPSR4_10        GPSR5_10        GPSR6_10 \
+               GPSR1_9         GPSR2_9         GPSR3_9         GPSR4_9         GPSR5_9         GPSR6_9 \
+GPSR0_8                GPSR1_8         GPSR2_8         GPSR3_8         GPSR4_8         GPSR5_8         GPSR6_8 \
+GPSR0_7                GPSR1_7         GPSR2_7         GPSR3_7         GPSR4_7         GPSR5_7         GPSR6_7 \
+GPSR0_6                GPSR1_6         GPSR2_6         GPSR3_6         GPSR4_6         GPSR5_6         GPSR6_6 \
+GPSR0_5                GPSR1_5         GPSR2_5         GPSR3_5         GPSR4_5         GPSR5_5         GPSR6_5 \
+GPSR0_4                GPSR1_4         GPSR2_4         GPSR3_4         GPSR4_4         GPSR5_4         GPSR6_4 \
+GPSR0_3                GPSR1_3         GPSR2_3         GPSR3_3         GPSR4_3         GPSR5_3         GPSR6_3 \
+GPSR0_2                GPSR1_2         GPSR2_2         GPSR3_2         GPSR4_2         GPSR5_2         GPSR6_2 \
+GPSR0_1                GPSR1_1         GPSR2_1         GPSR3_1         GPSR4_1         GPSR5_1         GPSR6_1 \
+GPSR0_0                GPSR1_0         GPSR2_0         GPSR3_0         GPSR4_0         GPSR5_0         GPSR6_0
+
+#define PINMUX_IPSR                            \
+\
+FM(IP0_3_0)    IP0_3_0         FM(IP1_3_0)     IP1_3_0         FM(IP2_3_0)     IP2_3_0         FM(IP3_3_0)     IP3_3_0 \
+FM(IP0_7_4)    IP0_7_4         FM(IP1_7_4)     IP1_7_4         FM(IP2_7_4)     IP2_7_4         FM(IP3_7_4)     IP3_7_4 \
+FM(IP0_11_8)   IP0_11_8        FM(IP1_11_8)    IP1_11_8        FM(IP2_11_8)    IP2_11_8        FM(IP3_11_8)    IP3_11_8 \
+FM(IP0_15_12)  IP0_15_12       FM(IP1_15_12)   IP1_15_12       FM(IP2_15_12)   IP2_15_12       FM(IP3_15_12)   IP3_15_12 \
+FM(IP0_19_16)  IP0_19_16       FM(IP1_19_16)   IP1_19_16       FM(IP2_19_16)   IP2_19_16       FM(IP3_19_16)   IP3_19_16 \
+FM(IP0_23_20)  IP0_23_20       FM(IP1_23_20)   IP1_23_20       FM(IP2_23_20)   IP2_23_20       FM(IP3_23_20)   IP3_23_20 \
+FM(IP0_27_24)  IP0_27_24       FM(IP1_27_24)   IP1_27_24       FM(IP2_27_24)   IP2_27_24       FM(IP3_27_24)   IP3_27_24 \
+FM(IP0_31_28)  IP0_31_28       FM(IP1_31_28)   IP1_31_28       FM(IP2_31_28)   IP2_31_28       FM(IP3_31_28)   IP3_31_28 \
+\
+FM(IP4_3_0)    IP4_3_0         FM(IP5_3_0)     IP5_3_0         FM(IP6_3_0)     IP6_3_0         FM(IP7_3_0)     IP7_3_0 \
+FM(IP4_7_4)    IP4_7_4         FM(IP5_7_4)     IP5_7_4         FM(IP6_7_4)     IP6_7_4         FM(IP7_7_4)     IP7_7_4 \
+FM(IP4_11_8)   IP4_11_8        FM(IP5_11_8)    IP5_11_8        FM(IP6_11_8)    IP6_11_8        FM(IP7_11_8)    IP7_11_8 \
+FM(IP4_15_12)  IP4_15_12       FM(IP5_15_12)   IP5_15_12       FM(IP6_15_12)   IP6_15_12       FM(IP7_15_12)   IP7_15_12 \
+FM(IP4_19_16)  IP4_19_16       FM(IP5_19_16)   IP5_19_16       FM(IP6_19_16)   IP6_19_16       FM(IP7_19_16)   IP7_19_16 \
+FM(IP4_23_20)  IP4_23_20       FM(IP5_23_20)   IP5_23_20       FM(IP6_23_20)   IP6_23_20       FM(IP7_23_20)   IP7_23_20 \
+FM(IP4_27_24)  IP4_27_24       FM(IP5_27_24)   IP5_27_24       FM(IP6_27_24)   IP6_27_24       FM(IP7_27_24)   IP7_27_24 \
+FM(IP4_31_28)  IP4_31_28       FM(IP5_31_28)   IP5_31_28       FM(IP6_31_28)   IP6_31_28       FM(IP7_31_28)   IP7_31_28 \
+\
+FM(IP8_3_0)    IP8_3_0         FM(IP9_3_0)     IP9_3_0         FM(IP10_3_0)    IP10_3_0        FM(IP11_3_0)    IP11_3_0 \
+FM(IP8_7_4)    IP8_7_4         FM(IP9_7_4)     IP9_7_4         FM(IP10_7_4)    IP10_7_4        FM(IP11_7_4)    IP11_7_4 \
+FM(IP8_11_8)   IP8_11_8        FM(IP9_11_8)    IP9_11_8        FM(IP10_11_8)   IP10_11_8       FM(IP11_11_8)   IP11_11_8 \
+FM(IP8_15_12)  IP8_15_12       FM(IP9_15_12)   IP9_15_12       FM(IP10_15_12)  IP10_15_12      FM(IP11_15_12)  IP11_15_12 \
+FM(IP8_19_16)  IP8_19_16       FM(IP9_19_16)   IP9_19_16       FM(IP10_19_16)  IP10_19_16      FM(IP11_19_16)  IP11_19_16 \
+FM(IP8_23_20)  IP8_23_20       FM(IP9_23_20)   IP9_23_20       FM(IP10_23_20)  IP10_23_20      FM(IP11_23_20)  IP11_23_20 \
+FM(IP8_27_24)  IP8_27_24       FM(IP9_27_24)   IP9_27_24       FM(IP10_27_24)  IP10_27_24      FM(IP11_27_24)  IP11_27_24 \
+FM(IP8_31_28)  IP8_31_28       FM(IP9_31_28)   IP9_31_28       FM(IP10_31_28)  IP10_31_28      FM(IP11_31_28)  IP11_31_28 \
+\
+FM(IP12_3_0)   IP12_3_0        FM(IP13_3_0)    IP13_3_0 \
+FM(IP12_7_4)   IP12_7_4        FM(IP13_7_4)    IP13_7_4 \
+FM(IP12_11_8)  IP12_11_8 \
+FM(IP12_15_12) IP12_15_12 \
+FM(IP12_19_16) IP12_19_16 \
+FM(IP12_23_20) IP12_23_20 \
+FM(IP12_27_24) IP12_27_24 \
+FM(IP12_31_28) IP12_31_28 \
+
+/* MOD_SEL0 */                 /* 0 */                 /* 1 */                 /* 2 */                 /* 3 */
+#define MOD_SEL0_30            FM(SEL_MSIOF2_0)        FM(SEL_MSIOF2_1)
+#define MOD_SEL0_29            FM(SEL_I2C3_0)          FM(SEL_I2C3_1)
+#define MOD_SEL0_28            FM(SEL_SCIF5_0)         FM(SEL_SCIF5_1)
+#define MOD_SEL0_27            FM(SEL_MSIOF3_0)        FM(SEL_MSIOF3_1)
+#define MOD_SEL0_26            FM(SEL_HSCIF3_0)        FM(SEL_HSCIF3_1)
+#define MOD_SEL0_25            FM(SEL_SCIF4_0)         FM(SEL_SCIF4_1)
+#define MOD_SEL0_24_23         FM(SEL_PWM0_0)          FM(SEL_PWM0_1)          FM(SEL_PWM0_2)          FM(SEL_PWM0_3)
+#define MOD_SEL0_22_21         FM(SEL_PWM1_0)          FM(SEL_PWM1_1)          FM(SEL_PWM1_2)          FM(SEL_PWM1_3)
+#define MOD_SEL0_20_19         FM(SEL_PWM2_0)          FM(SEL_PWM2_1)          FM(SEL_PWM2_2)          FM(SEL_PWM2_3)
+#define MOD_SEL0_18_17         FM(SEL_PWM3_0)          FM(SEL_PWM3_1)          FM(SEL_PWM3_2)          FM(SEL_PWM3_3)
+#define MOD_SEL0_15            FM(SEL_IRQ_0_0)         FM(SEL_IRQ_0_1)
+#define MOD_SEL0_14            FM(SEL_IRQ_1_0)         FM(SEL_IRQ_1_1)
+#define MOD_SEL0_13            FM(SEL_IRQ_2_0)         FM(SEL_IRQ_2_1)
+#define MOD_SEL0_12            FM(SEL_IRQ_3_0)         FM(SEL_IRQ_3_1)
+#define MOD_SEL0_11            FM(SEL_IRQ_4_0)         FM(SEL_IRQ_4_1)
+#define MOD_SEL0_10            FM(SEL_IRQ_5_0)         FM(SEL_IRQ_5_1)
+#define MOD_SEL0_5             FM(SEL_TMU_0_0)         FM(SEL_TMU_0_1)
+#define MOD_SEL0_4             FM(SEL_TMU_1_0)         FM(SEL_TMU_1_1)
+#define MOD_SEL0_3             FM(SEL_SCIF3_0)         FM(SEL_SCIF3_1)
+#define MOD_SEL0_2             FM(SEL_SCIF1_0)         FM(SEL_SCIF1_1)
+#define MOD_SEL0_1             FM(SEL_SCU_0)           FM(SEL_SCU_1)
+#define MOD_SEL0_0             FM(SEL_RFSO_0)          FM(SEL_RFSO_1)
+
+#define MOD_SEL1_31            FM(SEL_CAN0_0)          FM(SEL_CAN0_1)
+#define MOD_SEL1_30            FM(SEL_CAN1_0)          FM(SEL_CAN1_1)
+#define MOD_SEL1_29            FM(SEL_I2C2_0)          FM(SEL_I2C2_1)
+#define MOD_SEL1_28            FM(SEL_ETHERAVB_0)      FM(SEL_ETHERAVB_1)
+#define MOD_SEL1_27            FM(SEL_SCIF0_0)         FM(SEL_SCIF0_1)
+#define MOD_SEL1_26            FM(SEL_SSIF4_0)         FM(SEL_SSIF4_1)
+
+
+#define PINMUX_MOD_SELS        \
+\
+               MOD_SEL1_31 \
+MOD_SEL0_30    MOD_SEL1_30 \
+MOD_SEL0_29    MOD_SEL1_29 \
+MOD_SEL0_28    MOD_SEL1_28 \
+MOD_SEL0_27    MOD_SEL1_27 \
+MOD_SEL0_26    MOD_SEL1_26 \
+MOD_SEL0_25 \
+MOD_SEL0_24_23 \
+MOD_SEL0_22_21 \
+MOD_SEL0_20_19 \
+MOD_SEL0_18_17 \
+MOD_SEL0_15 \
+MOD_SEL0_14 \
+MOD_SEL0_13 \
+MOD_SEL0_12 \
+MOD_SEL0_11 \
+MOD_SEL0_10 \
+MOD_SEL0_5 \
+MOD_SEL0_4 \
+MOD_SEL0_3 \
+MOD_SEL0_2 \
+MOD_SEL0_1 \
+MOD_SEL0_0
+
+enum {
+       PINMUX_RESERVED = 0,
+
+       PINMUX_DATA_BEGIN,
+       GP_ALL(DATA),
+       PINMUX_DATA_END,
+
+#define F_(x, y)
+#define FM(x)  FN_##x,
+       PINMUX_FUNCTION_BEGIN,
+       GP_ALL(FN),
+       PINMUX_GPSR
+       PINMUX_IPSR
+       PINMUX_MOD_SELS
+       PINMUX_FUNCTION_END,
+#undef F_
+#undef FM
+
+#define F_(x, y)
+#define FM(x)  x##_MARK,
+       PINMUX_MARK_BEGIN,
+       PINMUX_GPSR
+       PINMUX_IPSR
+       PINMUX_MOD_SELS
+       PINMUX_MARK_END,
+#undef F_
+#undef FM
+};
+
+#define PINMUX_IPSR_MSEL2(ipsr, fn, msel1, msel2) \
+       PINMUX_DATA(fn##_MARK, FN_##msel1, FN_##msel2, FN_##fn, FN_##ipsr)
+
+#define PINMUX_IPSR_PHYS(ipsr, fn, msel) \
+       PINMUX_DATA(fn##_MARK, FN_##msel)
+
+static const u16 pinmux_data[] = {
+       PINMUX_DATA_GP_ALL(),
+
+       PINMUX_SINGLE(USB0_OVC),
+       PINMUX_SINGLE(USB0_PWEN),
+       PINMUX_SINGLE(VI4_DATA4),
+       PINMUX_SINGLE(VI4_CLK),
+       PINMUX_SINGLE(TX2),
+       PINMUX_SINGLE(RX2),
+       PINMUX_SINGLE(AVB0_LINK),
+       PINMUX_SINGLE(AVB0_PHY_INT),
+       PINMUX_SINGLE(AVB0_MAGIC),
+       PINMUX_SINGLE(AVB0_MDC),
+       PINMUX_SINGLE(AVB0_MDIO),
+       PINMUX_SINGLE(AVB0_TXCREFCLK),
+       PINMUX_SINGLE(AVB0_TD3),
+       PINMUX_SINGLE(AVB0_TD2),
+       PINMUX_SINGLE(AVB0_TD1),
+       PINMUX_SINGLE(AVB0_TD0),
+       PINMUX_SINGLE(AVB0_TXC),
+       PINMUX_SINGLE(AVB0_TX_CTL),
+       PINMUX_SINGLE(AVB0_RD3),
+       PINMUX_SINGLE(AVB0_RD2),
+       PINMUX_SINGLE(AVB0_RD1),
+       PINMUX_SINGLE(AVB0_RD0),
+       PINMUX_SINGLE(AVB0_RXC),
+       PINMUX_SINGLE(AVB0_RX_CTL),
+       PINMUX_SINGLE(RPC_INT_N),
+       PINMUX_SINGLE(RPC_RESET_N),
+       PINMUX_SINGLE(QSPI1_SSL),
+       PINMUX_SINGLE(QSPI1_IO3),
+       PINMUX_SINGLE(QSPI1_IO2),
+       PINMUX_SINGLE(QSPI1_MISO_IO1),
+       PINMUX_SINGLE(QSPI1_MOSI_IO0),
+       PINMUX_SINGLE(QSPI1_SPCLK),
+       PINMUX_SINGLE(QSPI0_SSL),
+       PINMUX_SINGLE(QSPI0_IO3),
+       PINMUX_SINGLE(QSPI0_IO2),
+       PINMUX_SINGLE(QSPI0_MISO_IO1),
+       PINMUX_SINGLE(QSPI0_MOSI_IO0),
+       PINMUX_SINGLE(QSPI0_SPCLK),
+
+       /* IPSR0 */
+       PINMUX_IPSR_MSEL(IP0_3_0,       IRQ0_A, SEL_IRQ_0_0),
+       PINMUX_IPSR_MSEL(IP0_3_0,       MSIOF2_SYNC_B, SEL_MSIOF2_1),
+       PINMUX_IPSR_GPSR(IP0_3_0,       USB0_IDIN),
+
+       PINMUX_IPSR_GPSR(IP0_7_4,       MSIOF2_SCK),
+       PINMUX_IPSR_GPSR(IP0_7_4,       USB0_IDPU),
+
+       PINMUX_IPSR_GPSR(IP0_11_8,      MSIOF2_TXD),
+       PINMUX_IPSR_MSEL(IP0_11_8,      SCL3_A, SEL_I2C3_0),
+
+       PINMUX_IPSR_GPSR(IP0_15_12,     MSIOF2_RXD),
+       PINMUX_IPSR_MSEL(IP0_15_12,     SDA3_A, SEL_I2C3_0),
+
+       PINMUX_IPSR_GPSR(IP0_19_16,     MLB_CLK),
+       PINMUX_IPSR_MSEL(IP0_19_16,     MSIOF2_SYNC_A, SEL_MSIOF2_0),
+       PINMUX_IPSR_MSEL(IP0_19_16,     SCK5_A, SEL_SCIF5_0),
+
+       PINMUX_IPSR_GPSR(IP0_23_20,     MLB_DAT),
+       PINMUX_IPSR_GPSR(IP0_23_20,     MSIOF2_SS1),
+       PINMUX_IPSR_MSEL(IP0_23_20,     RX5_A, SEL_SCIF5_0),
+       PINMUX_IPSR_MSEL(IP0_23_20,     SCL3_B, SEL_I2C3_1),
+
+       PINMUX_IPSR_GPSR(IP0_27_24,     MLB_SIG),
+       PINMUX_IPSR_GPSR(IP0_27_24,     MSIOF2_SS2),
+       PINMUX_IPSR_MSEL(IP0_27_24,     TX5_A, SEL_SCIF5_0),
+       PINMUX_IPSR_MSEL(IP0_27_24,     SDA3_B, SEL_I2C3_1),
+
+       PINMUX_IPSR_GPSR(IP0_31_28,     DU_DB0),
+       PINMUX_IPSR_GPSR(IP0_31_28,     LCDOUT0),
+       PINMUX_IPSR_MSEL(IP0_31_28,     MSIOF3_TXD_B, SEL_MSIOF3_1),
+
+       /* IPSR1 */
+       PINMUX_IPSR_GPSR(IP1_3_0,       DU_DB1),
+       PINMUX_IPSR_GPSR(IP1_3_0,       LCDOUT1),
+       PINMUX_IPSR_MSEL(IP1_3_0,       MSIOF3_RXD_B, SEL_MSIOF3_1),
+
+       PINMUX_IPSR_GPSR(IP1_7_4,       DU_DB2),
+       PINMUX_IPSR_GPSR(IP1_7_4,       LCDOUT2),
+       PINMUX_IPSR_MSEL(IP1_7_4,       IRQ0_B, SEL_IRQ_0_1),
+
+       PINMUX_IPSR_GPSR(IP1_11_8,      DU_DB3),
+       PINMUX_IPSR_GPSR(IP1_11_8,      LCDOUT3),
+       PINMUX_IPSR_MSEL(IP1_11_8,      SCK5_B, SEL_SCIF5_1),
+
+       PINMUX_IPSR_GPSR(IP1_15_12,     DU_DB4),
+       PINMUX_IPSR_GPSR(IP1_15_12,     LCDOUT4),
+       PINMUX_IPSR_MSEL(IP1_15_12,     RX5_B, SEL_SCIF5_1),
+
+       PINMUX_IPSR_GPSR(IP1_19_16,     DU_DB5),
+       PINMUX_IPSR_GPSR(IP1_19_16,     LCDOUT5),
+       PINMUX_IPSR_MSEL(IP1_19_16,     TX5_B, SEL_SCIF5_1),
+
+       PINMUX_IPSR_GPSR(IP1_23_20,     DU_DB6),
+       PINMUX_IPSR_GPSR(IP1_23_20,     LCDOUT6),
+       PINMUX_IPSR_MSEL(IP1_23_20,     MSIOF3_SS1_B, SEL_MSIOF3_1),
+
+       PINMUX_IPSR_GPSR(IP1_27_24,     DU_DB7),
+       PINMUX_IPSR_GPSR(IP1_27_24,     LCDOUT7),
+       PINMUX_IPSR_MSEL(IP1_27_24,     MSIOF3_SS2_B, SEL_MSIOF3_1),
+
+       PINMUX_IPSR_GPSR(IP1_31_28,     DU_DG0),
+       PINMUX_IPSR_GPSR(IP1_31_28,     LCDOUT8),
+       PINMUX_IPSR_MSEL(IP1_31_28,     MSIOF3_SCK_B, SEL_MSIOF3_1),
+
+       /* IPSR2 */
+       PINMUX_IPSR_GPSR(IP2_3_0,       DU_DG1),
+       PINMUX_IPSR_GPSR(IP2_3_0,       LCDOUT9),
+       PINMUX_IPSR_MSEL(IP2_3_0,       MSIOF3_SYNC_B, SEL_MSIOF3_1),
+
+       PINMUX_IPSR_GPSR(IP2_7_4,       DU_DG2),
+       PINMUX_IPSR_GPSR(IP2_7_4,       LCDOUT10),
+
+       PINMUX_IPSR_GPSR(IP2_11_8,      DU_DG3),
+       PINMUX_IPSR_GPSR(IP2_11_8,      LCDOUT11),
+       PINMUX_IPSR_MSEL(IP2_11_8,      IRQ1_A, SEL_IRQ_1_0),
+
+       PINMUX_IPSR_GPSR(IP2_15_12,     DU_DG4),
+       PINMUX_IPSR_GPSR(IP2_15_12,     LCDOUT12),
+       PINMUX_IPSR_MSEL(IP2_15_12,     HSCK3_B, SEL_HSCIF3_1),
+
+       PINMUX_IPSR_GPSR(IP2_19_16,     DU_DG5),
+       PINMUX_IPSR_GPSR(IP2_19_16,     LCDOUT13),
+       PINMUX_IPSR_MSEL(IP2_19_16,     HTX3_B, SEL_HSCIF3_1),
+
+       PINMUX_IPSR_GPSR(IP2_23_20,     DU_DG6),
+       PINMUX_IPSR_GPSR(IP2_23_20,     LCDOUT14),
+       PINMUX_IPSR_MSEL(IP2_23_20,     HRX3_B, SEL_HSCIF3_1),
+
+       PINMUX_IPSR_GPSR(IP2_27_24,     DU_DG7),
+       PINMUX_IPSR_GPSR(IP2_27_24,     LCDOUT15),
+       PINMUX_IPSR_MSEL(IP2_27_24,     SCK4_B, SEL_SCIF4_1),
+
+       PINMUX_IPSR_GPSR(IP2_31_28,     DU_DR0),
+       PINMUX_IPSR_GPSR(IP2_31_28,     LCDOUT16),
+       PINMUX_IPSR_MSEL(IP2_31_28,     RX4_B, SEL_SCIF4_1),
+
+       /* IPSR3 */
+       PINMUX_IPSR_GPSR(IP3_3_0,       DU_DR1),
+       PINMUX_IPSR_GPSR(IP3_3_0,       LCDOUT17),
+       PINMUX_IPSR_MSEL(IP3_3_0,       TX4_B, SEL_SCIF4_1),
+
+       PINMUX_IPSR_GPSR(IP3_7_4,       DU_DR2),
+       PINMUX_IPSR_GPSR(IP3_7_4,       LCDOUT18),
+       PINMUX_IPSR_MSEL(IP3_7_4,       PWM0_B, SEL_PWM0_2),
+
+       PINMUX_IPSR_GPSR(IP3_11_8,      DU_DR3),
+       PINMUX_IPSR_GPSR(IP3_11_8,      LCDOUT19),
+       PINMUX_IPSR_MSEL(IP3_11_8,      PWM1_B, SEL_PWM1_2),
+
+       PINMUX_IPSR_GPSR(IP3_15_12,     DU_DR4),
+       PINMUX_IPSR_GPSR(IP3_15_12,     LCDOUT20),
+       PINMUX_IPSR_MSEL(IP3_15_12,     TCLK2_B, SEL_TMU_0_1),
+
+       PINMUX_IPSR_GPSR(IP3_19_16,     DU_DR5),
+       PINMUX_IPSR_GPSR(IP3_19_16,     LCDOUT21),
+       PINMUX_IPSR_GPSR(IP3_19_16,     NMI),
+
+       PINMUX_IPSR_GPSR(IP3_23_20,     DU_DR6),
+       PINMUX_IPSR_GPSR(IP3_23_20,     LCDOUT22),
+       PINMUX_IPSR_MSEL(IP3_23_20,     PWM2_B, SEL_PWM2_2),
+
+       PINMUX_IPSR_GPSR(IP3_27_24,     DU_DR7),
+       PINMUX_IPSR_GPSR(IP3_27_24,     LCDOUT23),
+       PINMUX_IPSR_MSEL(IP3_27_24,     TCLK1_B, SEL_TMU_1_1),
+
+       PINMUX_IPSR_GPSR(IP3_31_28,     DU_DOTCLKOUT0),
+       PINMUX_IPSR_GPSR(IP3_31_28,     QCLK),
+
+       /* IPSR4 */
+       PINMUX_IPSR_GPSR(IP4_3_0,       DU_HSYNC),
+       PINMUX_IPSR_GPSR(IP4_3_0,       QSTH_QHS),
+       PINMUX_IPSR_MSEL(IP4_3_0,       IRQ3_A, SEL_IRQ_3_0),
+
+       PINMUX_IPSR_GPSR(IP4_7_4,       DU_VSYNC),
+       PINMUX_IPSR_GPSR(IP4_7_4,       QSTVA_QVS),
+       PINMUX_IPSR_MSEL(IP4_7_4,       IRQ4_A, SEL_IRQ_4_0),
+
+       PINMUX_IPSR_GPSR(IP4_11_8,      DU_DISP),
+       PINMUX_IPSR_GPSR(IP4_11_8,      QSTVB_QVE),
+       PINMUX_IPSR_MSEL(IP4_11_8,      PWM3_B, SEL_PWM3_2),
+
+       PINMUX_IPSR_GPSR(IP4_15_12,     DU_DISP_CDE),
+       PINMUX_IPSR_GPSR(IP4_15_12,     QCPV_QDE),
+       PINMUX_IPSR_MSEL(IP4_15_12,     IRQ2_B, SEL_IRQ_2_1),
+       PINMUX_IPSR_GPSR(IP4_15_12,     DU_DOTCLKIN1),
+
+       PINMUX_IPSR_GPSR(IP4_19_16,     DU_CDE),
+       PINMUX_IPSR_GPSR(IP4_19_16,     QSTB_QHE),
+       PINMUX_IPSR_MSEL(IP4_19_16,     SCK3_B, SEL_SCIF3_1),
+
+       PINMUX_IPSR_GPSR(IP4_23_20,     QPOLA),
+       PINMUX_IPSR_MSEL(IP4_23_20,     RX3_B, SEL_SCIF3_1),
+
+       PINMUX_IPSR_GPSR(IP4_27_24,     QPOLB),
+       PINMUX_IPSR_MSEL(IP4_27_24,     TX3_B, SEL_SCIF3_1),
+
+       PINMUX_IPSR_GPSR(IP4_31_28,     VI4_DATA0),
+       PINMUX_IPSR_MSEL(IP4_31_28,     PWM0_A, SEL_PWM0_0),
+
+       /* IPSR5 */
+       PINMUX_IPSR_GPSR(IP5_3_0,       VI4_DATA1),
+       PINMUX_IPSR_MSEL(IP5_3_0,       PWM1_A, SEL_PWM1_0),
+
+       PINMUX_IPSR_GPSR(IP5_7_4,       VI4_DATA2),
+       PINMUX_IPSR_MSEL(IP5_7_4,       PWM2_A, SEL_PWM2_0),
+
+       PINMUX_IPSR_GPSR(IP5_11_8,      VI4_DATA3),
+       PINMUX_IPSR_MSEL(IP5_11_8,      PWM3_A, SEL_PWM3_0),
+
+       PINMUX_IPSR_GPSR(IP5_15_12,     VI4_DATA5),
+       PINMUX_IPSR_MSEL(IP5_15_12,     SCK4_A, SEL_SCIF4_0),
+
+       PINMUX_IPSR_GPSR(IP5_19_16,     VI4_DATA6),
+       PINMUX_IPSR_MSEL(IP5_19_16,     IRQ2_A, SEL_IRQ_2_0),
+
+       PINMUX_IPSR_GPSR(IP5_23_20,     VI4_DATA7),
+       PINMUX_IPSR_MSEL(IP5_23_20,     TCLK2_A, SEL_TMU_0_0),
+
+       PINMUX_IPSR_GPSR(IP5_27_24,     VI4_DATA8),
+
+       PINMUX_IPSR_GPSR(IP5_31_28,     VI4_DATA9),
+       PINMUX_IPSR_MSEL(IP5_31_28,     MSIOF3_SS2_A, SEL_MSIOF3_0),
+       PINMUX_IPSR_MSEL(IP5_31_28,     IRQ1_B, SEL_IRQ_1_1),
+
+       /* IPSR6 */
+       PINMUX_IPSR_GPSR(IP6_3_0,       VI4_DATA10),
+       PINMUX_IPSR_MSEL(IP6_3_0,       RX4_A, SEL_SCIF4_0),
+
+       PINMUX_IPSR_GPSR(IP6_7_4,       VI4_DATA11),
+       PINMUX_IPSR_MSEL(IP6_7_4,       TX4_A, SEL_SCIF4_0),
+
+       PINMUX_IPSR_GPSR(IP6_11_8,      VI4_DATA12),
+       PINMUX_IPSR_MSEL(IP6_11_8,      TCLK1_A, SEL_TMU_1_0),
+
+       PINMUX_IPSR_GPSR(IP6_15_12,     VI4_DATA13),
+       PINMUX_IPSR_MSEL(IP6_15_12,     MSIOF3_SS1_A, SEL_MSIOF3_0),
+       PINMUX_IPSR_GPSR(IP6_15_12,     HCTS3_N),
+
+       PINMUX_IPSR_GPSR(IP6_19_16,     VI4_DATA14),
+       PINMUX_IPSR_MSEL(IP6_19_16,     SSI_SCK4_B, SEL_SSIF4_1),
+       PINMUX_IPSR_GPSR(IP6_19_16,     HRTS3_N),
+
+       PINMUX_IPSR_GPSR(IP6_23_20,     VI4_DATA15),
+       PINMUX_IPSR_MSEL(IP6_23_20,     SSI_SDATA4_B, SEL_SSIF4_1),
+
+       PINMUX_IPSR_GPSR(IP6_27_24,     VI4_DATA16),
+       PINMUX_IPSR_MSEL(IP6_27_24,     HRX3_A, SEL_HSCIF3_0),
+
+       PINMUX_IPSR_GPSR(IP6_31_28,     VI4_DATA17),
+       PINMUX_IPSR_MSEL(IP6_31_28,     HTX3_A, SEL_HSCIF3_0),
+
+       /* IPSR7 */
+       PINMUX_IPSR_GPSR(IP7_3_0,       VI4_DATA18),
+       PINMUX_IPSR_MSEL(IP7_3_0,       HSCK3_A, SEL_HSCIF3_0),
+
+       PINMUX_IPSR_GPSR(IP7_7_4,       VI4_DATA19),
+       PINMUX_IPSR_MSEL(IP7_7_4,       SSI_WS4_B, SEL_SSIF4_1),
+       PINMUX_IPSR_GPSR(IP7_7_4,       NFDATA15),
+
+       PINMUX_IPSR_GPSR(IP7_11_8,      VI4_DATA20),
+       PINMUX_IPSR_MSEL(IP7_11_8,      MSIOF3_SYNC_A, SEL_MSIOF3_0),
+       PINMUX_IPSR_GPSR(IP7_11_8,      NFDATA14),
+
+       PINMUX_IPSR_GPSR(IP7_15_12,     VI4_DATA21),
+       PINMUX_IPSR_MSEL(IP7_15_12,     MSIOF3_TXD_A, SEL_MSIOF3_0),
+
+       PINMUX_IPSR_GPSR(IP7_15_12,     NFDATA13),
+       PINMUX_IPSR_GPSR(IP7_19_16,     VI4_DATA22),
+       PINMUX_IPSR_MSEL(IP7_19_16,     MSIOF3_RXD_A, SEL_MSIOF3_0),
+
+       PINMUX_IPSR_GPSR(IP7_19_16,     NFDATA12),
+       PINMUX_IPSR_GPSR(IP7_23_20,     VI4_DATA23),
+       PINMUX_IPSR_MSEL(IP7_23_20,     MSIOF3_SCK_A, SEL_MSIOF3_0),
+
+       PINMUX_IPSR_GPSR(IP7_23_20,     NFDATA11),
+
+       PINMUX_IPSR_GPSR(IP7_27_24,     VI4_VSYNC_N),
+       PINMUX_IPSR_MSEL(IP7_27_24,     SCK1_B, SEL_SCIF1_1),
+       PINMUX_IPSR_GPSR(IP7_27_24,     NFDATA10),
+
+       PINMUX_IPSR_GPSR(IP7_31_28,     VI4_HSYNC_N),
+       PINMUX_IPSR_MSEL(IP7_31_28,     RX1_B, SEL_SCIF1_1),
+       PINMUX_IPSR_GPSR(IP7_31_28,     NFDATA9),
+
+       /* IPSR8 */
+       PINMUX_IPSR_GPSR(IP8_3_0,       VI4_FIELD),
+       PINMUX_IPSR_GPSR(IP8_3_0,       AUDIO_CLKB),
+       PINMUX_IPSR_MSEL(IP8_3_0,       IRQ5_A, SEL_IRQ_5_0),
+       PINMUX_IPSR_GPSR(IP8_3_0,       SCIF_CLK),
+       PINMUX_IPSR_GPSR(IP8_3_0,       NFDATA8),
+
+       PINMUX_IPSR_GPSR(IP8_7_4,       VI4_CLKENB),
+       PINMUX_IPSR_MSEL(IP8_7_4,       TX1_B, SEL_SCIF1_1),
+       PINMUX_IPSR_GPSR(IP8_7_4,       NFWP_N),
+       PINMUX_IPSR_MSEL(IP8_7_4,       DVC_MUTE_A, SEL_SCU_0),
+
+       PINMUX_IPSR_GPSR(IP8_11_8,      NFALE),
+       PINMUX_IPSR_MSEL(IP8_11_8,      SCL2_B, SEL_I2C2_1),
+       PINMUX_IPSR_MSEL(IP8_11_8,      IRQ3_B, SEL_IRQ_3_1),
+       PINMUX_IPSR_MSEL(IP8_11_8,      PWM0_C, SEL_PWM0_1),
+
+       PINMUX_IPSR_GPSR(IP8_15_12,     NFCLE),
+       PINMUX_IPSR_MSEL(IP8_15_12,     SDA2_B, SEL_I2C2_1),
+       PINMUX_IPSR_MSEL(IP8_15_12,     SCK3_A, SEL_SCIF3_0),
+       PINMUX_IPSR_MSEL(IP8_15_12,     PWM1_C, SEL_PWM1_1),
+
+       PINMUX_IPSR_GPSR(IP8_19_16,     NFCE_N),
+       PINMUX_IPSR_MSEL(IP8_19_16,     RX3_A, SEL_SCIF3_0),
+       PINMUX_IPSR_MSEL(IP8_19_16,     PWM2_C, SEL_PWM2_1),
+
+       PINMUX_IPSR_GPSR(IP8_23_20,     NFRB_N),
+       PINMUX_IPSR_MSEL(IP8_23_20,     TX3_A, SEL_SCIF3_0),
+       PINMUX_IPSR_MSEL(IP8_23_20,     PWM3_C, SEL_PWM3_1),
+
+       PINMUX_IPSR_GPSR(IP8_27_24,     NFRE_N),
+       PINMUX_IPSR_GPSR(IP8_27_24,     MMC_CMD),
+
+       PINMUX_IPSR_GPSR(IP8_31_28,     NFWE_N),
+       PINMUX_IPSR_GPSR(IP8_31_28,     MMC_CLK),
+
+       /* IPSR9 */
+       PINMUX_IPSR_GPSR(IP9_3_0,       NFDATA0),
+       PINMUX_IPSR_GPSR(IP9_3_0,       MMC_D0),
+
+       PINMUX_IPSR_GPSR(IP9_7_4,       NFDATA1),
+       PINMUX_IPSR_GPSR(IP9_7_4,       MMC_D1),
+
+       PINMUX_IPSR_GPSR(IP9_11_8,      NFDATA2),
+       PINMUX_IPSR_GPSR(IP9_11_8,      MMC_D2),
+
+       PINMUX_IPSR_GPSR(IP9_15_12,     NFDATA3),
+       PINMUX_IPSR_GPSR(IP9_15_12,     MMC_D3),
+
+       PINMUX_IPSR_GPSR(IP9_19_16,     NFDATA4),
+       PINMUX_IPSR_GPSR(IP9_19_16,     MMC_D4),
+
+       PINMUX_IPSR_GPSR(IP9_23_20,     NFDATA5),
+       PINMUX_IPSR_GPSR(IP9_23_20,     MMC_D5),
+
+       PINMUX_IPSR_GPSR(IP9_27_24,     NFDATA6),
+       PINMUX_IPSR_GPSR(IP9_27_24,     MMC_D6),
+
+       PINMUX_IPSR_GPSR(IP9_31_28,     NFDATA7),
+       PINMUX_IPSR_GPSR(IP9_31_28,     MMC_D7),
+
+       /* IPSR10 */
+       PINMUX_IPSR_GPSR(IP10_3_0,      AUDIO_CLKA),
+       PINMUX_IPSR_MSEL(IP10_3_0,      DVC_MUTE_B, SEL_SCU_1),
+
+       PINMUX_IPSR_GPSR(IP10_7_4,      SSI_SCK34),
+       PINMUX_IPSR_MSEL(IP10_7_4,      FSO_CFE_0_N_A, SEL_RFSO_0),
+
+       PINMUX_IPSR_GPSR(IP10_11_8,     SSI_SDATA3),
+       PINMUX_IPSR_MSEL(IP10_11_8,     FSO_CFE_1_N_A, SEL_RFSO_0),
+
+       PINMUX_IPSR_GPSR(IP10_15_12,    SSI_WS34),
+       PINMUX_IPSR_MSEL(IP10_15_12,    FSO_TOE_N_A, SEL_RFSO_0),
+
+       PINMUX_IPSR_MSEL(IP10_19_16,    SSI_SCK4_A, SEL_SSIF4_0),
+       PINMUX_IPSR_GPSR(IP10_19_16,    HSCK0),
+       PINMUX_IPSR_GPSR(IP10_19_16,    AUDIO_CLKOUT),
+       PINMUX_IPSR_MSEL(IP10_19_16,    CAN0_RX_B, SEL_CAN0_1),
+       PINMUX_IPSR_MSEL(IP10_19_16,    IRQ4_B, SEL_IRQ_4_1),
+
+       PINMUX_IPSR_MSEL(IP10_23_20,    SSI_SDATA4_A, SEL_SSIF4_0),
+       PINMUX_IPSR_GPSR(IP10_23_20,    HTX0),
+       PINMUX_IPSR_MSEL(IP10_23_20,    SCL2_A, SEL_I2C2_0),
+       PINMUX_IPSR_MSEL(IP10_23_20,    CAN1_RX_B, SEL_CAN1_1),
+
+       PINMUX_IPSR_MSEL(IP10_27_24,    SSI_WS4_A, SEL_SSIF4_0),
+       PINMUX_IPSR_GPSR(IP10_27_24,    HRX0),
+       PINMUX_IPSR_MSEL(IP10_27_24,    SDA2_A, SEL_I2C2_0),
+       PINMUX_IPSR_MSEL(IP10_27_24,    CAN1_TX_B, SEL_CAN1_1),
+
+       PINMUX_IPSR_GPSR(IP10_31_28,    SCL1),
+       PINMUX_IPSR_GPSR(IP10_31_28,    CTS1_N),
+
+       /* IPSR11 */
+       PINMUX_IPSR_GPSR(IP11_3_0,      SDA1),
+       PINMUX_IPSR_GPSR(IP11_3_0,      RTS1_N_TANS),
+
+       PINMUX_IPSR_GPSR(IP11_7_4,      MSIOF1_SCK),
+       PINMUX_IPSR_MSEL(IP11_7_4,      AVB0_AVTP_PPS_B, SEL_ETHERAVB_1),
+
+       PINMUX_IPSR_GPSR(IP11_11_8,     MSIOF1_TXD),
+       PINMUX_IPSR_MSEL(IP11_11_8,     AVB0_AVTP_CAPTURE_B, SEL_ETHERAVB_1),
+
+       PINMUX_IPSR_GPSR(IP11_15_12,    MSIOF1_RXD),
+       PINMUX_IPSR_MSEL(IP11_15_12,    AVB0_AVTP_MATCH_B, SEL_ETHERAVB_1),
+
+       PINMUX_IPSR_MSEL(IP11_19_16,    SCK0_A, SEL_SCIF0_0),
+       PINMUX_IPSR_GPSR(IP11_19_16,    MSIOF1_SYNC),
+       PINMUX_IPSR_MSEL(IP11_19_16,    FSO_CFE_0_N_B, SEL_RFSO_1),
+
+       PINMUX_IPSR_MSEL(IP11_23_20,    RX0_A, SEL_SCIF0_0),
+       PINMUX_IPSR_GPSR(IP11_23_20,    MSIOF0_SS1),
+       PINMUX_IPSR_MSEL(IP11_23_20,    FSO_CFE_1_N_B, SEL_RFSO_1),
+
+       PINMUX_IPSR_MSEL(IP11_27_24,    TX0_A, SEL_SCIF0_0),
+       PINMUX_IPSR_GPSR(IP11_27_24,    MSIOF0_SS2),
+       PINMUX_IPSR_MSEL(IP11_27_24,    FSO_TOE_N_B, SEL_RFSO_1),
+
+       PINMUX_IPSR_MSEL(IP11_31_28,    SCK1_A, SEL_SCIF1_0),
+       PINMUX_IPSR_GPSR(IP11_31_28,    MSIOF1_SS2),
+       PINMUX_IPSR_GPSR(IP11_31_28,    TPU0TO2_B),
+       PINMUX_IPSR_MSEL(IP11_31_28,    CAN0_TX_B, SEL_CAN0_1),
+       PINMUX_IPSR_GPSR(IP11_31_28,    AUDIO_CLKOUT1),
+
+       /* IPSR12 */
+       PINMUX_IPSR_MSEL(IP12_3_0,      RX1_A, SEL_SCIF1_0),
+       PINMUX_IPSR_GPSR(IP12_3_0,      CTS0_N),
+       PINMUX_IPSR_GPSR(IP12_3_0,      TPU0TO0_B),
+
+       PINMUX_IPSR_MSEL(IP12_7_4,      TX1_A, SEL_SCIF1_0),
+       PINMUX_IPSR_GPSR(IP12_7_4,      RTS0_N_TANS),
+       PINMUX_IPSR_GPSR(IP12_7_4,      TPU0TO1_B),
+
+       PINMUX_IPSR_GPSR(IP12_11_8,     SCK2),
+       PINMUX_IPSR_GPSR(IP12_11_8,     MSIOF1_SS1),
+       PINMUX_IPSR_GPSR(IP12_11_8,     TPU0TO3_B),
+
+       PINMUX_IPSR_GPSR(IP12_15_12,    TPU0TO0_A),
+       PINMUX_IPSR_MSEL(IP12_15_12,    AVB0_AVTP_CAPTURE_A, SEL_ETHERAVB_0),
+       PINMUX_IPSR_GPSR(IP12_15_12,    HCTS0_N),
+
+       PINMUX_IPSR_GPSR(IP12_19_16,    TPU0TO1_A),
+       PINMUX_IPSR_MSEL(IP12_19_16,    AVB0_AVTP_MATCH_A, SEL_ETHERAVB_0),
+       PINMUX_IPSR_GPSR(IP12_19_16,    HRTS0_N),
+
+       PINMUX_IPSR_GPSR(IP12_23_20,    CAN_CLK),
+       PINMUX_IPSR_MSEL(IP12_23_20,    AVB0_AVTP_PPS_A, SEL_ETHERAVB_0),
+       PINMUX_IPSR_MSEL(IP12_23_20,    SCK0_B, SEL_SCIF0_1),
+       PINMUX_IPSR_MSEL(IP12_23_20,    IRQ5_B, SEL_IRQ_5_1),
+
+       PINMUX_IPSR_MSEL(IP12_27_24,    CAN0_RX_A, SEL_CAN0_0),
+       PINMUX_IPSR_GPSR(IP12_27_24,    CANFD0_RX),
+       PINMUX_IPSR_MSEL(IP12_27_24,    RX0_B, SEL_SCIF0_1),
+
+       PINMUX_IPSR_MSEL(IP12_31_28,    CAN0_TX_A, SEL_CAN0_0),
+       PINMUX_IPSR_GPSR(IP12_31_28,    CANFD0_TX),
+       PINMUX_IPSR_MSEL(IP12_31_28,    TX0_B, SEL_SCIF0_1),
+
+       /* IPSR13 */
+       PINMUX_IPSR_MSEL(IP13_3_0,      CAN1_RX_A, SEL_CAN1_0),
+       PINMUX_IPSR_GPSR(IP13_3_0,      CANFD1_RX),
+       PINMUX_IPSR_GPSR(IP13_3_0,      TPU0TO2_A),
+
+       PINMUX_IPSR_MSEL(IP13_7_4,      CAN1_TX_A, SEL_CAN1_0),
+       PINMUX_IPSR_GPSR(IP13_7_4,      CANFD1_TX),
+       PINMUX_IPSR_GPSR(IP13_7_4,      TPU0TO3_A),
+};
+
+static const struct sh_pfc_pin pinmux_pins[] = {
+       PINMUX_GPIO_GP_ALL(),
+};
+
+/* - I2C -------------------------------------------------------------------- */
+static const unsigned int i2c0_pins[] = {
+       /* SCL, SDA */
+       RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 9),
+};
+static const unsigned int i2c0_mux[] = {
+       SCL0_MARK, SDA0_MARK,
+};
+static const unsigned int i2c1_pins[] = {
+       /* SCL, SDA */
+       RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 11),
+};
+static const unsigned int i2c1_mux[] = {
+       SCL1_MARK, SDA1_MARK,
+};
+static const unsigned int i2c2_a_pins[] = {
+       /* SCL, SDA */
+       RCAR_GP_PIN(4, 6), RCAR_GP_PIN(4, 7),
+};
+static const unsigned int i2c2_a_mux[] = {
+       SCL2_A_MARK, SDA2_A_MARK,
+};
+static const unsigned int i2c2_b_pins[] = {
+       /* SCL, SDA */
+       RCAR_GP_PIN(2, 29), RCAR_GP_PIN(2, 30),
+};
+static const unsigned int i2c2_b_mux[] = {
+       SCL2_B_MARK, SDA2_B_MARK,
+};
+static const unsigned int i2c3_a_pins[] = {
+       /* SCL, SDA */
+       RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
+};
+static const unsigned int i2c3_a_mux[] = {
+       SCL3_A_MARK, SDA3_A_MARK,
+};
+static const unsigned int i2c3_b_pins[] = {
+       /* SCL, SDA */
+       RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 8),
+};
+static const unsigned int i2c3_b_mux[] = {
+       SCL3_B_MARK, SDA3_B_MARK,
+};
+
+/* - MMC ------------------------------------------------------------------- */
+static const unsigned int mmc_data1_pins[] = {
+       /* D0 */
+       RCAR_GP_PIN(3, 2),
+};
+static const unsigned int mmc_data1_mux[] = {
+       MMC_D0_MARK,
+};
+static const unsigned int mmc_data4_pins[] = {
+       /* D[0:3] */
+       RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3),
+       RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
+};
+static const unsigned int mmc_data4_mux[] = {
+       MMC_D0_MARK, MMC_D1_MARK,
+       MMC_D2_MARK, MMC_D3_MARK,
+};
+static const unsigned int mmc_data8_pins[] = {
+       /* D[0:7] */
+       RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3),
+       RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
+       RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
+       RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
+};
+static const unsigned int mmc_data8_mux[] = {
+       MMC_D0_MARK, MMC_D1_MARK,
+       MMC_D2_MARK, MMC_D3_MARK,
+       MMC_D4_MARK, MMC_D5_MARK,
+       MMC_D6_MARK, MMC_D7_MARK,
+};
+static const unsigned int mmc_ctrl_pins[] = {
+       /* CLK, CMD */
+       RCAR_GP_PIN(3, 1), RCAR_GP_PIN(3, 0),
+};
+static const unsigned int mmc_ctrl_mux[] = {
+       MMC_CLK_MARK, MMC_CMD_MARK,
+};
+
+/* - SCIF0 ------------------------------------------------------------------ */
+static const unsigned int scif0_data_a_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(4, 20), RCAR_GP_PIN(4, 21),
+};
+static const unsigned int scif0_data_a_mux[] = {
+       RX0_A_MARK, TX0_A_MARK,
+};
+static const unsigned int scif0_clk_a_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(4, 19),
+};
+static const unsigned int scif0_clk_a_mux[] = {
+       SCK0_A_MARK,
+};
+static const unsigned int scif0_data_b_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(4, 31), RCAR_GP_PIN(4, 28),
+};
+static const unsigned int scif0_data_b_mux[] = {
+       RX0_B_MARK, TX0_B_MARK,
+};
+static const unsigned int scif0_clk_b_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(5, 2),
+};
+static const unsigned int scif0_clk_b_mux[] = {
+       SCK0_B_MARK,
+};
+static const unsigned int scif0_ctrl_pins[] = {
+       /* RTS, CTS */
+       RCAR_GP_PIN(4, 24), RCAR_GP_PIN(4, 23),
+};
+static const unsigned int scif0_ctrl_mux[] = {
+       RTS0_N_TANS_MARK, CTS0_N_MARK,
+};
+/* - SCIF1 ------------------------------------------------------------------ */
+static const unsigned int scif1_data_a_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(4, 23), RCAR_GP_PIN(4, 24),
+};
+static const unsigned int scif1_data_a_mux[] = {
+       RX1_A_MARK, TX1_A_MARK,
+};
+static const unsigned int scif1_clk_a_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(4, 22),
+};
+static const unsigned int scif1_clk_a_mux[] = {
+       SCK1_A_MARK,
+};
+static const unsigned int scif1_data_b_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(2, 26), RCAR_GP_PIN(2, 28),
+};
+static const unsigned int scif1_data_b_mux[] = {
+       RX1_B_MARK, TX1_B_MARK,
+};
+static const unsigned int scif1_clk_b_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(2, 25),
+};
+static const unsigned int scif1_clk_b_mux[] = {
+       SCK1_B_MARK,
+};
+static const unsigned int scif1_ctrl_pins[] = {
+       /* RTS, CTS */
+       RCAR_GP_PIN(4, 11), RCAR_GP_PIN(4, 10),
+};
+static const unsigned int scif1_ctrl_mux[] = {
+       RTS1_N_TANS_MARK, CTS1_N_MARK,
+};
+
+/* - SCIF2 ------------------------------------------------------------------ */
+static const unsigned int scif2_data_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(4, 26), RCAR_GP_PIN(4, 27),
+};
+static const unsigned int scif2_data_mux[] = {
+       RX2_MARK, TX2_MARK,
+};
+static const unsigned int scif2_clk_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(4, 25),
+};
+static const unsigned int scif2_clk_mux[] = {
+       SCK2_MARK,
+};
+/* - SCIF3 ------------------------------------------------------------------ */
+static const unsigned int scif3_data_a_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(2, 31), RCAR_GP_PIN(4, 00),
+};
+static const unsigned int scif3_data_a_mux[] = {
+       RX3_A_MARK, TX3_A_MARK,
+};
+static const unsigned int scif3_clk_a_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(2, 30),
+};
+static const unsigned int scif3_clk_a_mux[] = {
+       SCK3_A_MARK,
+};
+static const unsigned int scif3_data_b_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(1, 30), RCAR_GP_PIN(1, 31),
+};
+static const unsigned int scif3_data_b_mux[] = {
+       RX3_B_MARK, TX3_B_MARK,
+};
+static const unsigned int scif3_clk_b_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(1, 29),
+};
+static const unsigned int scif3_clk_b_mux[] = {
+       SCK3_B_MARK,
+};
+/* - SCIF4 ------------------------------------------------------------------ */
+static const unsigned int scif4_data_a_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 12),
+};
+static const unsigned int scif4_data_a_mux[] = {
+       RX4_A_MARK, TX4_A_MARK,
+};
+static const unsigned int scif4_clk_a_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(2, 6),
+};
+static const unsigned int scif4_clk_a_mux[] = {
+       SCK4_A_MARK,
+};
+static const unsigned int scif4_data_b_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 17),
+};
+static const unsigned int scif4_data_b_mux[] = {
+       RX4_B_MARK, TX4_B_MARK,
+};
+static const unsigned int scif4_clk_b_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(1, 15),
+};
+static const unsigned int scif4_clk_b_mux[] = {
+       SCK4_B_MARK,
+};
+/* - SCIF5 ------------------------------------------------------------------ */
+static const unsigned int scif5_data_a_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 8),
+};
+static const unsigned int scif5_data_a_mux[] = {
+       RX5_A_MARK, TX5_A_MARK,
+};
+static const unsigned int scif5_clk_a_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(0, 6),
+};
+static const unsigned int scif5_clk_a_mux[] = {
+       SCK5_A_MARK,
+};
+static const unsigned int scif5_data_b_pins[] = {
+       /* RX, TX */
+       RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
+};
+static const unsigned int scif5_data_b_mux[] = {
+       RX5_B_MARK, TX5_B_MARK,
+};
+static const unsigned int scif5_clk_b_pins[] = {
+       /* SCK */
+       RCAR_GP_PIN(1, 3),
+};
+static const unsigned int scif5_clk_b_mux[] = {
+       SCK5_B_MARK,
+};
+/* - SCIF Clock ------------------------------------------------------------- */
+static const unsigned int scif_clk_pins[] = {
+       /* SCIF_CLK */
+       RCAR_GP_PIN(2, 27),
+};
+static const unsigned int scif_clk_mux[] = {
+       SCIF_CLK_MARK,
+};
+
+static const struct sh_pfc_pin_group pinmux_groups[] = {
+       SH_PFC_PIN_GROUP(i2c0),
+       SH_PFC_PIN_GROUP(i2c1),
+       SH_PFC_PIN_GROUP(i2c2_a),
+       SH_PFC_PIN_GROUP(i2c2_b),
+       SH_PFC_PIN_GROUP(i2c3_a),
+       SH_PFC_PIN_GROUP(i2c3_b),
+       SH_PFC_PIN_GROUP(mmc_data1),
+       SH_PFC_PIN_GROUP(mmc_data4),
+       SH_PFC_PIN_GROUP(mmc_data8),
+       SH_PFC_PIN_GROUP(mmc_ctrl),
+       SH_PFC_PIN_GROUP(scif0_data_a),
+       SH_PFC_PIN_GROUP(scif0_clk_a),
+       SH_PFC_PIN_GROUP(scif0_data_b),
+       SH_PFC_PIN_GROUP(scif0_clk_b),
+       SH_PFC_PIN_GROUP(scif0_ctrl),
+       SH_PFC_PIN_GROUP(scif1_data_a),
+       SH_PFC_PIN_GROUP(scif1_clk_a),
+       SH_PFC_PIN_GROUP(scif1_data_b),
+       SH_PFC_PIN_GROUP(scif1_clk_b),
+       SH_PFC_PIN_GROUP(scif1_ctrl),
+       SH_PFC_PIN_GROUP(scif2_data),
+       SH_PFC_PIN_GROUP(scif2_clk),
+       SH_PFC_PIN_GROUP(scif3_data_a),
+       SH_PFC_PIN_GROUP(scif3_clk_a),
+       SH_PFC_PIN_GROUP(scif3_data_b),
+       SH_PFC_PIN_GROUP(scif3_clk_b),
+       SH_PFC_PIN_GROUP(scif4_data_a),
+       SH_PFC_PIN_GROUP(scif4_clk_a),
+       SH_PFC_PIN_GROUP(scif4_data_b),
+       SH_PFC_PIN_GROUP(scif4_clk_b),
+       SH_PFC_PIN_GROUP(scif5_data_a),
+       SH_PFC_PIN_GROUP(scif5_clk_a),
+       SH_PFC_PIN_GROUP(scif5_data_b),
+       SH_PFC_PIN_GROUP(scif5_clk_b),
+       SH_PFC_PIN_GROUP(scif_clk),
+};
+
+static const char * const i2c0_groups[] = {
+       "i2c0",
+};
+static const char * const i2c1_groups[] = {
+       "i2c1",
+};
+
+static const char * const i2c2_groups[] = {
+       "i2c2_a",
+       "i2c2_b",
+};
+
+static const char * const i2c3_groups[] = {
+       "i2c3_a",
+       "i2c3_b",
+};
+
+static const char * const mmc_groups[] = {
+       "mmc_data1",
+       "mmc_data4",
+       "mmc_data8",
+       "mmc_ctrl",
+};
+
+static const char * const scif0_groups[] = {
+       "scif0_data_a",
+       "scif0_clk_a",
+       "scif0_data_b",
+       "scif0_clk_b",
+       "scif0_ctrl",
+};
+
+static const char * const scif1_groups[] = {
+       "scif1_data_a",
+       "scif1_clk_a",
+       "scif1_data_b",
+       "scif1_clk_b",
+       "scif1_ctrl",
+};
+
+static const char * const scif2_groups[] = {
+       "scif2_data",
+       "scif2_clk",
+};
+
+static const char * const scif3_groups[] = {
+       "scif3_data_a",
+       "scif3_clk_a",
+       "scif3_data_b",
+       "scif3_clk_b",
+};
+
+static const char * const scif4_groups[] = {
+       "scif4_data_a",
+       "scif4_clk_a",
+       "scif4_data_b",
+       "scif4_clk_b",
+};
+
+static const char * const scif5_groups[] = {
+       "scif5_data_a",
+       "scif5_clk_a",
+       "scif5_data_b",
+       "scif5_clk_b",
+};
+
+static const char * const scif_clk_groups[] = {
+       "scif_clk",
+};
+
+static const struct sh_pfc_function pinmux_functions[] = {
+       SH_PFC_FUNCTION(i2c0),
+       SH_PFC_FUNCTION(i2c1),
+       SH_PFC_FUNCTION(i2c2),
+       SH_PFC_FUNCTION(i2c3),
+       SH_PFC_FUNCTION(mmc),
+       SH_PFC_FUNCTION(scif0),
+       SH_PFC_FUNCTION(scif1),
+       SH_PFC_FUNCTION(scif2),
+       SH_PFC_FUNCTION(scif3),
+       SH_PFC_FUNCTION(scif4),
+       SH_PFC_FUNCTION(scif5),
+       SH_PFC_FUNCTION(scif_clk),
+};
+
+static const struct pinmux_cfg_reg pinmux_config_regs[] = {
+#define F_(x, y)       FN_##y
+#define FM(x)          FN_##x
+       { PINMUX_CFG_REG("GPSR0", 0xe6060100, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_0_8_FN,      GPSR0_8,
+               GP_0_7_FN,      GPSR0_7,
+               GP_0_6_FN,      GPSR0_6,
+               GP_0_5_FN,      GPSR0_5,
+               GP_0_4_FN,      GPSR0_4,
+               GP_0_3_FN,      GPSR0_3,
+               GP_0_2_FN,      GPSR0_2,
+               GP_0_1_FN,      GPSR0_1,
+               GP_0_0_FN,      GPSR0_0, }
+       },
+       { PINMUX_CFG_REG("GPSR1", 0xe6060104, 32, 1) {
+               GP_1_31_FN,     GPSR1_31,
+               GP_1_30_FN,     GPSR1_30,
+               GP_1_29_FN,     GPSR1_29,
+               GP_1_28_FN,     GPSR1_28,
+               GP_1_27_FN,     GPSR1_27,
+               GP_1_26_FN,     GPSR1_26,
+               GP_1_25_FN,     GPSR1_25,
+               GP_1_24_FN,     GPSR1_24,
+               GP_1_23_FN,     GPSR1_23,
+               GP_1_22_FN,     GPSR1_22,
+               GP_1_21_FN,     GPSR1_21,
+               GP_1_20_FN,     GPSR1_20,
+               GP_1_19_FN,     GPSR1_19,
+               GP_1_18_FN,     GPSR1_18,
+               GP_1_17_FN,     GPSR1_17,
+               GP_1_16_FN,     GPSR1_16,
+               GP_1_15_FN,     GPSR1_15,
+               GP_1_14_FN,     GPSR1_14,
+               GP_1_13_FN,     GPSR1_13,
+               GP_1_12_FN,     GPSR1_12,
+               GP_1_11_FN,     GPSR1_11,
+               GP_1_10_FN,     GPSR1_10,
+               GP_1_9_FN,      GPSR1_9,
+               GP_1_8_FN,      GPSR1_8,
+               GP_1_7_FN,      GPSR1_7,
+               GP_1_6_FN,      GPSR1_6,
+               GP_1_5_FN,      GPSR1_5,
+               GP_1_4_FN,      GPSR1_4,
+               GP_1_3_FN,      GPSR1_3,
+               GP_1_2_FN,      GPSR1_2,
+               GP_1_1_FN,      GPSR1_1,
+               GP_1_0_FN,      GPSR1_0, }
+       },
+       { PINMUX_CFG_REG("GPSR2", 0xe6060108, 32, 1) {
+               GP_2_31_FN,     GPSR2_31,
+               GP_2_30_FN,     GPSR2_30,
+               GP_2_29_FN,     GPSR2_29,
+               GP_2_28_FN,     GPSR2_28,
+               GP_2_27_FN,     GPSR2_27,
+               GP_2_26_FN,     GPSR2_26,
+               GP_2_25_FN,     GPSR2_25,
+               GP_2_24_FN,     GPSR2_24,
+               GP_2_23_FN,     GPSR2_23,
+               GP_2_22_FN,     GPSR2_22,
+               GP_2_21_FN,     GPSR2_21,
+               GP_2_20_FN,     GPSR2_20,
+               GP_2_19_FN,     GPSR2_19,
+               GP_2_18_FN,     GPSR2_18,
+               GP_2_17_FN,     GPSR2_17,
+               GP_2_16_FN,     GPSR2_16,
+               GP_2_15_FN,     GPSR2_15,
+               GP_2_14_FN,     GPSR2_14,
+               GP_2_13_FN,     GPSR2_13,
+               GP_2_12_FN,     GPSR2_12,
+               GP_2_11_FN,     GPSR2_11,
+               GP_2_10_FN,     GPSR2_10,
+               GP_2_9_FN,      GPSR2_9,
+               GP_2_8_FN,      GPSR2_8,
+               GP_2_7_FN,      GPSR2_7,
+               GP_2_6_FN,      GPSR2_6,
+               GP_2_5_FN,      GPSR2_5,
+               GP_2_4_FN,      GPSR2_4,
+               GP_2_3_FN,      GPSR2_3,
+               GP_2_2_FN,      GPSR2_2,
+               GP_2_1_FN,      GPSR2_1,
+               GP_2_0_FN,      GPSR2_0, }
+       },
+       { PINMUX_CFG_REG("GPSR3", 0xe606010c, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_3_9_FN,      GPSR3_9,
+               GP_3_8_FN,      GPSR3_8,
+               GP_3_7_FN,      GPSR3_7,
+               GP_3_6_FN,      GPSR3_6,
+               GP_3_5_FN,      GPSR3_5,
+               GP_3_4_FN,      GPSR3_4,
+               GP_3_3_FN,      GPSR3_3,
+               GP_3_2_FN,      GPSR3_2,
+               GP_3_1_FN,      GPSR3_1,
+               GP_3_0_FN,      GPSR3_0, }
+       },
+       { PINMUX_CFG_REG("GPSR4", 0xe6060110, 32, 1) {
+               GP_4_31_FN,     GPSR4_31,
+               GP_4_30_FN,     GPSR4_30,
+               GP_4_29_FN,     GPSR4_29,
+               GP_4_28_FN,     GPSR4_28,
+               GP_4_27_FN,     GPSR4_27,
+               GP_4_26_FN,     GPSR4_26,
+               GP_4_25_FN,     GPSR4_25,
+               GP_4_24_FN,     GPSR4_24,
+               GP_4_23_FN,     GPSR4_23,
+               GP_4_22_FN,     GPSR4_22,
+               GP_4_21_FN,     GPSR4_21,
+               GP_4_20_FN,     GPSR4_20,
+               GP_4_19_FN,     GPSR4_19,
+               GP_4_18_FN,     GPSR4_18,
+               GP_4_17_FN,     GPSR4_17,
+               GP_4_16_FN,     GPSR4_16,
+               GP_4_15_FN,     GPSR4_15,
+               GP_4_14_FN,     GPSR4_14,
+               GP_4_13_FN,     GPSR4_13,
+               GP_4_12_FN,     GPSR4_12,
+               GP_4_11_FN,     GPSR4_11,
+               GP_4_10_FN,     GPSR4_10,
+               GP_4_9_FN,      GPSR4_9,
+               GP_4_8_FN,      GPSR4_8,
+               GP_4_7_FN,      GPSR4_7,
+               GP_4_6_FN,      GPSR4_6,
+               GP_4_5_FN,      GPSR4_5,
+               GP_4_4_FN,      GPSR4_4,
+               GP_4_3_FN,      GPSR4_3,
+               GP_4_2_FN,      GPSR4_2,
+               GP_4_1_FN,      GPSR4_1,
+               GP_4_0_FN,      GPSR4_0, }
+       },
+       { PINMUX_CFG_REG("GPSR5", 0xe6060114, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_5_20_FN,     GPSR5_20,
+               GP_5_19_FN,     GPSR5_19,
+               GP_5_18_FN,     GPSR5_18,
+               GP_5_17_FN,     GPSR5_17,
+               GP_5_16_FN,     GPSR5_16,
+               GP_5_15_FN,     GPSR5_15,
+               GP_5_14_FN,     GPSR5_14,
+               GP_5_13_FN,     GPSR5_13,
+               GP_5_12_FN,     GPSR5_12,
+               GP_5_11_FN,     GPSR5_11,
+               GP_5_10_FN,     GPSR5_10,
+               GP_5_9_FN,      GPSR5_9,
+               GP_5_8_FN,      GPSR5_8,
+               GP_5_7_FN,      GPSR5_7,
+               GP_5_6_FN,      GPSR5_6,
+               GP_5_5_FN,      GPSR5_5,
+               GP_5_4_FN,      GPSR5_4,
+               GP_5_3_FN,      GPSR5_3,
+               GP_5_2_FN,      GPSR5_2,
+               GP_5_1_FN,      GPSR5_1,
+               GP_5_0_FN,      GPSR5_0, }
+       },
+       { PINMUX_CFG_REG("GPSR6", 0xe6060118, 32, 1) {
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               0, 0,
+               GP_6_13_FN,     GPSR6_13,
+               GP_6_12_FN,     GPSR6_12,
+               GP_6_11_FN,     GPSR6_11,
+               GP_6_10_FN,     GPSR6_10,
+               GP_6_9_FN,      GPSR6_9,
+               GP_6_8_FN,      GPSR6_8,
+               GP_6_7_FN,      GPSR6_7,
+               GP_6_6_FN,      GPSR6_6,
+               GP_6_5_FN,      GPSR6_5,
+               GP_6_4_FN,      GPSR6_4,
+               GP_6_3_FN,      GPSR6_3,
+               GP_6_2_FN,      GPSR6_2,
+               GP_6_1_FN,      GPSR6_1,
+               GP_6_0_FN,      GPSR6_0, }
+       },
+#undef F_
+#undef FM
+
+#define F_(x, y)       x,
+#define FM(x)          FN_##x,
+       { PINMUX_CFG_REG("IPSR0", 0xe6060200, 32, 4) {
+               IP0_31_28
+               IP0_27_24
+               IP0_23_20
+               IP0_19_16
+               IP0_15_12
+               IP0_11_8
+               IP0_7_4
+               IP0_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR1", 0xe6060204, 32, 4) {
+               IP1_31_28
+               IP1_27_24
+               IP1_23_20
+               IP1_19_16
+               IP1_15_12
+               IP1_11_8
+               IP1_7_4
+               IP1_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR2", 0xe6060208, 32, 4) {
+               IP2_31_28
+               IP2_27_24
+               IP2_23_20
+               IP2_19_16
+               IP2_15_12
+               IP2_11_8
+               IP2_7_4
+               IP2_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR3", 0xe606020c, 32, 4) {
+               IP3_31_28
+               IP3_27_24
+               IP3_23_20
+               IP3_19_16
+               IP3_15_12
+               IP3_11_8
+               IP3_7_4
+               IP3_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR4", 0xe6060210, 32, 4) {
+               IP4_31_28
+               IP4_27_24
+               IP4_23_20
+               IP4_19_16
+               IP4_15_12
+               IP4_11_8
+               IP4_7_4
+               IP4_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR5", 0xe6060214, 32, 4) {
+               IP5_31_28
+               IP5_27_24
+               IP5_23_20
+               IP5_19_16
+               IP5_15_12
+               IP5_11_8
+               IP5_7_4
+               IP5_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR6", 0xe6060218, 32, 4) {
+               IP6_31_28
+               IP6_27_24
+               IP6_23_20
+               IP6_19_16
+               IP6_15_12
+               IP6_11_8
+               IP6_7_4
+               IP6_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR7", 0xe606021c, 32, 4) {
+               IP7_31_28
+               IP7_27_24
+               IP7_23_20
+               IP7_19_16
+               IP7_15_12
+               IP7_11_8
+               IP7_7_4
+               IP7_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR8", 0xe6060220, 32, 4) {
+               IP8_31_28
+               IP8_27_24
+               IP8_23_20
+               IP8_19_16
+               IP8_15_12
+               IP8_11_8
+               IP8_7_4
+               IP8_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR9", 0xe6060224, 32, 4) {
+               IP9_31_28
+               IP9_27_24
+               IP9_23_20
+               IP9_19_16
+               IP9_15_12
+               IP9_11_8
+               IP9_7_4
+               IP9_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR10", 0xe6060228, 32, 4) {
+               IP10_31_28
+               IP10_27_24
+               IP10_23_20
+               IP10_19_16
+               IP10_15_12
+               IP10_11_8
+               IP10_7_4
+               IP10_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR11", 0xe606022c, 32, 4) {
+               IP11_31_28
+               IP11_27_24
+               IP11_23_20
+               IP11_19_16
+               IP11_15_12
+               IP11_11_8
+               IP11_7_4
+               IP11_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR12", 0xe6060230, 32, 4) {
+               IP12_31_28
+               IP12_27_24
+               IP12_23_20
+               IP12_19_16
+               IP12_15_12
+               IP12_11_8
+               IP12_7_4
+               IP12_3_0 }
+       },
+       { PINMUX_CFG_REG("IPSR13", 0xe6060234, 32, 4) {
+               /* IP13_31_28 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* IP13_27_24 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* IP13_23_20 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* IP13_19_16 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* IP13_15_12 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* IP13_11_8  */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               IP13_7_4
+               IP13_3_0 }
+       },
+#undef F_
+#undef FM
+
+#define F_(x, y)       x,
+#define FM(x)          FN_##x,
+       { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32,
+                            1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1,
+                            1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1) {
+               /* RESERVED 31 */
+               0, 0,
+               MOD_SEL0_30
+               MOD_SEL0_29
+               MOD_SEL0_28
+               MOD_SEL0_27
+               MOD_SEL0_26
+               MOD_SEL0_25
+               MOD_SEL0_24_23
+               MOD_SEL0_22_21
+               MOD_SEL0_20_19
+               MOD_SEL0_18_17
+               /* RESERVED 16 */
+               0, 0,
+               MOD_SEL0_15
+               MOD_SEL0_14
+               MOD_SEL0_13
+               MOD_SEL0_12
+               MOD_SEL0_11
+               MOD_SEL0_10
+               /* RESERVED 9, 8, 7, 6 */
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               MOD_SEL0_5
+               MOD_SEL0_4
+               MOD_SEL0_3
+               MOD_SEL0_2
+               MOD_SEL0_1
+               MOD_SEL0_0 }
+       },
+       { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32,
+                            1, 1, 1, 1, 1, 1, 2, 4, 4,
+                            4, 4, 4, 4) {
+               MOD_SEL1_31
+               MOD_SEL1_30
+               MOD_SEL1_29
+               MOD_SEL1_28
+               MOD_SEL1_27
+               MOD_SEL1_26
+               /* RESERVED 25, 24 */
+               0, 0, 0, 0,
+               /* RESERVED 23, 22, 21, 20 */
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* RESERVED 19, 18, 17, 16 */
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* RESERVED 15, 14, 13, 12 */
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* RESERVED 11, 10, 9, 8  */
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* RESERVED 7, 6, 5, 4  */
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               /* RESERVED 3, 2, 1, 0  */
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+       },
+       { },
+};
+
+static int r8a77995_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *pocctrl)
+{
+       int bit = -EINVAL;
+
+       *pocctrl = 0xe6060380;
+
+       if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 9))
+               bit = 29 - (pin - RCAR_GP_PIN(3, 0));
+
+       return bit;
+}
+
+static const struct sh_pfc_soc_operations r8a77995_pinmux_ops = {
+       .pin_to_pocctrl = r8a77995_pin_to_pocctrl,
+};
+
+const struct sh_pfc_soc_info r8a77995_pinmux_info = {
+       .name = "r8a77995_pfc",
+       .ops = &r8a77995_pinmux_ops,
+       .unlock_reg = 0xe6060000, /* PMMR */
+
+       .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
+
+       .pins = pinmux_pins,
+       .nr_pins = ARRAY_SIZE(pinmux_pins),
+       .groups = pinmux_groups,
+       .nr_groups = ARRAY_SIZE(pinmux_groups),
+       .functions = pinmux_functions,
+       .nr_functions = ARRAY_SIZE(pinmux_functions),
+
+       .cfg_regs = pinmux_config_regs,
+
+       .pinmux_data = pinmux_data,
+       .pinmux_data_size = ARRAY_SIZE(pinmux_data),
+};
index 6670072504535c81608586dcce0af9623b7c3d0c..69e4cec01bd22989e6d2473e45d0a109a79cd58b 100644 (file)
@@ -26,6 +26,8 @@ DECLARE_GLOBAL_DATA_PTR;
 enum sh_pfc_model {
        SH_PFC_R8A7795 = 0,
        SH_PFC_R8A7796,
+       SH_PFC_R8A77970,
+       SH_PFC_R8A77995,
 };
 
 struct sh_pfc_pin_config {
@@ -778,6 +780,14 @@ static int sh_pfc_pinctrl_probe(struct udevice *dev)
        if (model == SH_PFC_R8A7796)
                priv->pfc.info = &r8a7796_pinmux_info;
 #endif
+#ifdef CONFIG_PINCTRL_PFC_R8A77970
+       if (model == SH_PFC_R8A77970)
+               priv->pfc.info = &r8a77970_pinmux_info;
+#endif
+#ifdef CONFIG_PINCTRL_PFC_R8A77995
+       if (model == SH_PFC_R8A77995)
+               priv->pfc.info = &r8a77995_pinmux_info;
+#endif
 
        priv->pmx.pfc = &priv->pfc;
        sh_pfc_init_ranges(&priv->pfc);
@@ -798,6 +808,18 @@ static const struct udevice_id sh_pfc_pinctrl_ids[] = {
                .compatible = "renesas,pfc-r8a7796",
                .data = SH_PFC_R8A7796,
        },
+#endif
+#ifdef CONFIG_PINCTRL_PFC_R8A77970
+       {
+               .compatible = "renesas,pfc-r8a77970",
+               .data = SH_PFC_R8A77970,
+       },
+#endif
+#ifdef CONFIG_PINCTRL_PFC_R8A77995
+       {
+               .compatible = "renesas,pfc-r8a77995",
+               .data = SH_PFC_R8A77995,
+       },
 #endif
        { },
 };
index f82417b1a342b7901efd8cfe4b75893e477a545c..3b306c0457bae0d3ae5ad41de25c5ba6bf5968d3 100644 (file)
@@ -247,6 +247,8 @@ int sh_pfc_config_mux_for_gpio(struct udevice *dev, unsigned pin_selector);
 
 extern const struct sh_pfc_soc_info r8a7795_pinmux_info;
 extern const struct sh_pfc_soc_info r8a7796_pinmux_info;
+extern const struct sh_pfc_soc_info r8a77970_pinmux_info;
+extern const struct sh_pfc_soc_info r8a77995_pinmux_info;
 /* -----------------------------------------------------------------------------
  * Helper macros to create pin and port lists
  */
@@ -338,6 +340,11 @@ extern const struct sh_pfc_soc_info r8a7796_pinmux_info;
        PORT_GP_CFG_1(bank, 3,  fn, sfx, cfg)
 #define PORT_GP_4(bank, fn, sfx)       PORT_GP_CFG_4(bank, fn, sfx, 0)
 
+#define PORT_GP_CFG_6(bank, fn, sfx, cfg)                              \
+       PORT_GP_CFG_4(bank, fn, sfx, cfg),                              \
+       PORT_GP_CFG_1(bank, 4,  fn, sfx, cfg), PORT_GP_CFG_1(bank, 5,  fn, sfx, cfg)
+#define PORT_GP_6(bank, fn, sfx)       PORT_GP_CFG_6(bank, fn, sfx, 0)
+
 #define PORT_GP_CFG_8(bank, fn, sfx, cfg)                              \
        PORT_GP_CFG_4(bank, fn, sfx, cfg),                              \
        PORT_GP_CFG_1(bank, 4,  fn, sfx, cfg),                          \
@@ -399,6 +406,12 @@ extern const struct sh_pfc_soc_info r8a7796_pinmux_info;
        PORT_GP_CFG_1(bank, 20, fn, sfx, cfg)
 #define PORT_GP_21(bank, fn, sfx)      PORT_GP_CFG_21(bank, fn, sfx, 0)
 
+#define PORT_GP_CFG_22(bank, fn, sfx, cfg)                             \
+       PORT_GP_CFG_18(bank, fn, sfx, cfg),                             \
+       PORT_GP_CFG_1(bank, 18, fn, sfx, cfg), PORT_GP_CFG_1(bank, 19, fn, sfx, cfg),   \
+       PORT_GP_CFG_1(bank, 20, fn, sfx, cfg), PORT_GP_CFG_1(bank, 21, fn, sfx, cfg)
+#define PORT_GP_22(bank, fn, sfx)      PORT_GP_CFG_22(bank, fn, sfx, 0)
+
 #define PORT_GP_CFG_23(bank, fn, sfx, cfg)                             \
        PORT_GP_CFG_21(bank, fn, sfx, cfg),                             \
        PORT_GP_CFG_1(bank, 21, fn, sfx, cfg),                          \
index ca27ee5736877a23fef42ed45e245c234064d2fa..c226913f9e8c2af9ef6252f59e3aa306ec0102e5 100644 (file)
@@ -161,7 +161,7 @@ static int msm_spmi_probe(struct udevice *dev)
                return -EINVAL;
 
        /* Scan peripherals connected to each SPMI channel */
-       for (i = 0; i < SPMI_MAX_CHANNELS ; i++) {
+       for (i = 0; i < SPMI_MAX_PERIPH ; i++) {
                uint32_t periph = readl(priv->arb_chnl + ARB_CHANNEL_OFFSET(i));
                uint8_t slave_id = (periph & 0xf0000) >> 16;
                uint8_t pid = (periph & 0xff00) >> 8;
index 28d2bc8454c5614ba3f295a83bb7021a8a1884a6..e0ca2cb0d4c50b9adc851ae2b35b65073f9924c0 100644 (file)
@@ -10,6 +10,7 @@
 #include <console.h>
 #include <usb.h>
 #include <asm/io.h>
+#include <linux/iopoll.h>
 
 #include "r8a66597.h"
 
@@ -297,7 +298,6 @@ static int send_setup_packet(struct r8a66597 *r8a66597, struct usb_device *dev,
        int timeout = 3000;
 #if defined(CONFIG_RZA_USB)
        u16 dcpctr;
-       int timeout2 = 10000;
 #endif
        u16 devsel = setup->request == USB_REQ_SET_ADDRESS ? 0 : dev->devnum;
 
@@ -308,13 +308,10 @@ static int send_setup_packet(struct r8a66597 *r8a66597, struct usb_device *dev,
 #if defined(CONFIG_RZA_USB)
        dcpctr = r8a66597_read(r8a66597, DCPCTR);
        if ((dcpctr & PID) == PID_BUF) {
-               timeout2 = 10000;
-               while (!(dcpctr & BSTS)) {
-                       dcpctr = r8a66597_read(r8a66597, DCPCTR);
-                       if (timeout2-- < 0) {
-                               printf("DCPCTR clear timeout!\n");
-                               break;
-                       }
+               if (readw_poll_timeout(r8a66597->reg + DCPCTR, dcpctr,
+                                      dcpctr & BSTS, 1000) < 0) {
+                       printf("DCPCTR BSTS timeout!\n");
+                       return -ETIMEDOUT;
                }
        }
 #endif
index b6715418fc8cd0ae59a328156968fe7524559b05..bd1a7b267930028de906409049ddde3c7fa85eb6 100644 (file)
 /*
  * SATA
  */
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1_OFFSET        0x18000
index d06d4a28170f4be171abb10f0e3b080f33fc8e87..c88aa9563221028ebec081f6473af7defd5fca9a 100644 (file)
@@ -67,7 +67,6 @@
 /* The CF card interface on the back of the board */
 #define CONFIG_COMPACT_FLASH
 #define CONFIG_VSC7385_ENET    /* VSC7385 ethernet support */
-#define CONFIG_SATA_SIL3114    /* SIL3114 SATA controller */
 #define CONFIG_SYS_USB_HOST    /* use the EHCI USB controller */
 #endif
 
 #ifdef CONFIG_SATA_SIL3114
 
 #define CONFIG_SYS_SATA_MAX_DEVICE      4
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 
 #endif
index 264aa90cb3082446ab57130049f8aca90f23dfe1..3cc1a4717b6406cbce047be5efbc6749404b4c82 100644 (file)
@@ -420,9 +420,6 @@ extern int board_pci_host_broken(void);
 /*
  * SATA
  */
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1_OFFSET        0x18000
index beec38f9342be98c67101aac1caba3dd463760c2..656180f91a8bc8e7ee862c1927ab7a2c745b53da 100644 (file)
 /*
  * SATA
  */
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1_OFFSET        0x18000
index 3319a6f958dc9f1858654e779c2da27f3cd2abf5..7587225bda67a5c719f3a71ff6567e793eb8d7ec 100644 (file)
 #endif /* CONFIG_PCI */
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 2aea8928eed7f6a92086ef944b22003591297fe2..bec8a09b5f324a5e7b4de2f09f88608d112bccac 100644 (file)
@@ -282,10 +282,8 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #endif
 
 #define CONFIG_PCI_SCAN_SHOW           /* show pci devices on startup */
-#define CONFIG_SCSI_AHCI
 
 #ifdef CONFIG_SCSI_AHCI
-#define CONFIG_LIBATA
 #define CONFIG_SATA_ULI5288
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    4
 #define CONFIG_SYS_SCSI_MAX_LUN        1
index b277cdb1c66e1f209c488ef181a6022d9b352aee..ebc2e3aad493e162553ed3dece03e9ebee217f59 100644 (file)
 #endif
 
 #define CONFIG_PCI_SCAN_SHOW           /* show pci devices on startup */
-#define CONFIG_SCSI_AHCI
 
 #ifdef CONFIG_SCSI_AHCI
-#define CONFIG_LIBATA
 #define CONFIG_SATA_ULI5288
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    4
 #define CONFIG_SYS_SCSI_MAX_LUN        1
index e7b59a3d65ae75cfa98d04fd01cd3dcbbd2d56ca..bd14bc0607eb748bb85a30e611013de2d9c5f971 100644 (file)
 #define PCI_IDSEL_NUMBER       0x0c    /* slot0->3(IDSEL)=12->15 */
 #endif
 
-#define CONFIG_SCSI_AHCI
-
 #ifdef CONFIG_SCSI_AHCI
-#define CONFIG_LIBATA
 #define CONFIG_SATA_ULI5288
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    4
 #define CONFIG_SYS_SCSI_MAX_LUN        1
index 298fe5a63de6a446af1bbd31b208524518e8780b..567111798bf2c6f5976240911a147b723ebda71c 100644 (file)
@@ -373,10 +373,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 
 #undef CONFIG_PCI_SCAN_SHOW            /* show pci devices on startup */
 
-#define CONFIG_SCSI_AHCI
-
 #ifdef CONFIG_SCSI_AHCI
-#define CONFIG_LIBATA
 #define CONFIG_SATA_ULI5288
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    4
 #define CONFIG_SYS_SCSI_MAX_LUN        1
index cbc15ae4c51ad8d1fc2651676dee489657a123e9..72b6e3ad6d2a86714a3ae69302233341e449bb08 100644 (file)
@@ -634,9 +634,7 @@ extern unsigned long get_sdram_size(void);
 #endif /* CONFIG_TSEC_ENET */
 
 /* SATA */
-#define CONFIG_FSL_SATA
 #define CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
 
 #ifdef CONFIG_FSL_SATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
index 4756a7102da061f56191fa86e5c34d49d556e263..30e20bc6e48a81f0c78b22ce64756176ba25e51e 100644 (file)
 #endif
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
 #define CONFIG_FSL_SATA_V2
 
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
index 600823798c72019d85d10b70fe7e8ac1fe4235b5..917e5d5a064e454c174beff9568559fca3d55c50 100644 (file)
@@ -527,9 +527,6 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_FSL_SATA_V2
 
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_FSL_SATA
-#define CONFIG_LIBATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index f192181c0844c00a44f49eeebcf5d37a74153606..117def9dc2fed4b62569ff8b34b632366f4c9dcc 100644 (file)
@@ -12,9 +12,7 @@
 
 #define CONFIG_PCIE3
 
-#define CONFIG_SATA_SIL
 #define CONFIG_SYS_SATA_MAX_DEVICE  2
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 
 #define CONFIG_SYS_SRIO
index 259e8a01f38ddb4f40346a05cc358f72d90eb6be..ed6df539167e99e8621bed022fe81efb1f372f84 100644 (file)
@@ -615,8 +615,6 @@ unsigned long get_board_ddr_clk(void);
  */
 #define CONFIG_FSL_SATA_V2
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index c694e50c2c2e8ea062a172c66bcaec229fb00671..bc5c0d2e68f3ab839382ef525d72b139de1d3062 100644 (file)
@@ -500,9 +500,6 @@ unsigned long get_board_ddr_clk(void);
 /* SATA */
 #define CONFIG_FSL_SATA_V2
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 9d82e1be7852d1ebb0ae32e25df9083e68c3ef93..2b9c77f7c882b8880d27bf8fda1ee33e0be7d79c 100644 (file)
@@ -614,9 +614,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
 /* SATA */
 #define CONFIG_FSL_SATA_V2
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 41926f76e68a920b2ab4c1de6b0dd131b291ab9a..43fcc6f5ddc4499847cb429c3445e72c732e47b4 100644 (file)
@@ -678,8 +678,6 @@ unsigned long get_board_ddr_clk(void);
  * SATA
  */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index d2ddb17fce25d59f3f7ec0575ebfeb3c279f2e4d..e1c57de2af790a7613acac146782e4795a441b97 100644 (file)
@@ -628,8 +628,6 @@ unsigned long get_board_ddr_clk(void);
  * SATA
  */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 885dc776eb96def8fe58a7db0ab7bd8747e104d3..099e9e1d94ce838278f76e68acebefb9cc68e5ce 100644 (file)
@@ -468,9 +468,6 @@ unsigned long get_board_ddr_clk(void);
 
 /* SATA */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 625130aafcb81d69fa1e694647c09097bda8874b..98f8f4f10c5838778f695a66c39320a71cab2db1 100644 (file)
 
 /* SATA */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
@@ -635,9 +632,6 @@ unsigned long get_board_ddr_clk(void);
 
 /* SATA */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 902abc48cecc7fa36055cd2864497209854d8682..e8b1a74c64a82414c4ee1dd7407419297e8f7407 100644 (file)
 
 #define CONFIG_ENV_OVERWRITE
 
-#define CONFIG_SATA_SIL
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 
 #define CONFIG_SYS_CLK_FREQ    66666666
index 09f470c6b56f4466eb97e32fb36630822a063a1e..f370fe5b7814f350d4f9db930941b3363cff5bea 100644 (file)
 #define CONFIG_MXC_OCOTP
 
 /* SATA Configs */
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 
 /* MMC Configs */
 #define CONFIG_FSL_ESDHC
index dc05bea05e98804275533403262d655b4e7cb789..28618a579cd89cc7afae8466aec7a19fb37e2c6e 100644 (file)
@@ -96,8 +96,6 @@
 #define CONFIG_OMAP_USB3PHY1_HOST
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
index 5a51f3c5560a232b8fa939b552ef7d19b903c12d..c4e93562b5fca24c30aeb7e6f0b48267885190b9 100644 (file)
  * SATA Configs
  */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 /* Network */
index 2e8993d7d4c6a0f743d1426165757ade909e301a..b50535f9b06b65c161e02f85f8ac7eb53c9016be 100644 (file)
 #define CONFIG_IMX_HDMI
 
 /* SATA */
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 
 /* Ethernet */
 #define CONFIG_FEC_MXC
index a3b40ab1966f78a3254f6e8a5f91a5d12c6afa9f..6935b06d5c15ac91c014296bae206cbc518a75fa 100644 (file)
@@ -62,8 +62,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
index da3233e965b4fd7d02059f6487989f6351307a70..51956102335105e974821906c24b0fed8fe6cf22 100644 (file)
 
 /* SATA */
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
-#define CONFIG_DWC_AHSATA
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 
index 9152c71717e31e8c247106bb5af4f7ec435cc099..1351eb85f2f7b55441b438d02e6e91dbaf25131b 100644 (file)
@@ -47,8 +47,6 @@
 #define CONFIG_SPL_SATA_BOOT_DEVICE            0
 #define CONFIG_SYS_SATA_FAT_BOOT_PARTITION     1
 
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
index 37c8be48ace1adf7915751e859caeaf77050395b..4312ddd4fc64fb0a0f93f34efae31f38f65be631 100644 (file)
 /*
  * SATA
  */
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 
-#define CONFIG_FSL_SATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 715e9ed9c902b74196141776f9e343eb7f0703ea..a882fa650b987dfc33dbed711ae5fd8ecbf48367 100644 (file)
@@ -48,8 +48,6 @@
 /*
  * SATA/SCSI/AHCI configuration
  */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    2
 #define CONFIG_SYS_SCSI_MAX_LUN                1
index 0dbf149725dc291fc598c89d9b45d27727c70245..d0e8bfbed7713d12bef0b41efe377e59bf71fd13 100644 (file)
 
 /* SATA */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 1b20d85acfc5136336721cea5f49ef2a98563e08..4fea53bf797cdb6801ddd069eda874f1a09dfa0a 100644 (file)
 
 /* SATA */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 44fd968d3b6ec751c38568ea5eea6ba58c7d3ac1..32f93f2f46e9d63f3def6e7ebf0b96dca10af306 100644 (file)
@@ -44,8 +44,6 @@
 /*
  * SATA/SCSI/AHCI configuration
  */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    2
 #define CONFIG_SYS_SCSI_MAX_LUN                1
index 4a5be6188f1131da6e4de0ca525520c0f80b158b..3dcc28710bb1765ac859addac682e1c97f9d228f 100644 (file)
@@ -49,8 +49,6 @@
 
 /* SATA support */
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
-#define CONFIG_SATA_MV
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 
 /* Additional FS support/configuration */
index 11a01d476fbcfbb8e38eefdea6a76f37c8f1cbbc..fb49997ebd3aed87fe663f24c048b1113b5d46cd 100644 (file)
 
 /* SATA Configs */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 /* SPI Flash Configs */
index f84c1f014673ecd5bcecddea88b8300bea705ffe..f777d576dd35eed5801a8a23bd7e12235554f513 100644 (file)
 #define CONFIG_OMAP_USB2PHY2_HOST
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
diff --git a/include/configs/draak.h b/include/configs/draak.h
new file mode 100644 (file)
index 0000000..392ba4a
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * include/configs/draak.h
+ *     This file is Draak board configuration.
+ *
+ * Copyright (C) 2015 Renesas Electronics Corporation
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __DRAAK_H
+#define __DRAAK_H
+
+#undef DEBUG
+
+#include "rcar-gen3-common.h"
+
+/* Ethernet RAVB */
+#define CONFIG_NET_MULTI
+#define CONFIG_BITBANGMII
+#define CONFIG_BITBANGMII_MULTI
+
+/* Board Clock */
+/* XTAL_CLK : 33.33MHz */
+#define CONFIG_SYS_CLK_FREQ    33333333u
+
+/* Generic Timer Definitions (use in assembler source) */
+#define COUNTER_FREQUENCY      0xFE502A        /* 16.66MHz from CPclk */
+
+/* Environment in eMMC, at the end of 2nd "boot sector" */
+#define CONFIG_ENV_OFFSET              (-CONFIG_ENV_SIZE)
+#define CONFIG_SYS_MMC_ENV_DEV         1
+#define CONFIG_SYS_MMC_ENV_PART                2
+
+#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_MTD
+#define CONFIG_FLASH_SHOW_PROGRESS     45
+#define CONFIG_MTD_DEVICE
+#define CONFIG_SYS_FLASH_BANKS_LIST    { 0x08000000 }
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_CFI_WIDTH     FLASH_CFI_16BIT
+#define CONFIG_SYS_MAX_FLASH_BANKS_DETECT      1
+#define CONFIG_SYS_MAX_FLASH_SECT      256
+#define CONFIG_SYS_WRITE_SWAPPED_DATA
+#define CONFIG_CMD_CACHE
+
+#endif /* __DRAAK_H */
diff --git a/include/configs/eagle.h b/include/configs/eagle.h
new file mode 100644 (file)
index 0000000..2ef0c7a
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * include/configs/eagle.h
+ *     This file is Eagle board configuration.
+ *
+ * Copyright (C) 2015 Renesas Electronics Corporation
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __EAGLE_H
+#define __EAGLE_H
+
+#undef DEBUG
+
+#include "rcar-gen3-common.h"
+
+/* Ethernet RAVB */
+#define CONFIG_NET_MULTI
+#define CONFIG_BITBANGMII
+#define CONFIG_BITBANGMII_MULTI
+
+/* Board Clock */
+/* XTAL_CLK : 33.33MHz */
+#define CONFIG_SYS_CLK_FREQ    33333333u
+
+/* Generic Timer Definitions (use in assembler source) */
+#define COUNTER_FREQUENCY      0xFE502A        /* 16.66MHz from CPclk */
+
+#endif /* __EAGLE_H */
index 17d23839b8f25de57ab7770f02cfe5f98e68c1b7..2b7a5d7c5cfb9fd746e06162cc2c2e987e30966a 100644 (file)
 #define __io
 #define CONFIG_IDE_PREINIT
 /* ED Mini V has an IDE-compatible SATA connector for port 1 */
-#define CONFIG_MVSATA_IDE
 #define CONFIG_MVSATA_IDE_USE_PORT1
 /* Needs byte-swapping for ATA data register */
 #define CONFIG_IDE_SWAP_IO
index 43935bf4b4f64d069dd5fe06c0e30fdf495cd75c..b0276151398f40d23986c6062a0a4a378c6eb58e 100644 (file)
@@ -11,8 +11,6 @@
 
 #undef CONFIG_TPM_TIS_BASE_ADDRESS
 
-#undef CONFIG_SCSI_AHCI
-
 #define CONFIG_STD_DEVICES_SETTINGS     "stdin=usbkbd,vga,serial\0" \
                                        "stdout=vga,serial\0" \
                                        "stderr=vga,serial\0"
index 00c5434125c9ff40d9ae439048c6ce95427244d6..cf798d07e790e7090e785490a1a0d87f48b04511 100644 (file)
@@ -22,9 +22,6 @@
                                        "stdout=serial\0" \
                                        "stderr=serial\0"
 
-/* SATA is not supported in Quark SoC */
-#undef CONFIG_SCSI_AHCI
-
 /* 10/100M Ethernet support */
 #define CONFIG_DESIGNWARE_ETH
 #define CONFIG_DW_ALTDESCRIPTOR
index 33f5101c145f08f6e8cee4a6a99405c60cc24957..1454577dbfc49eaa320e08cd3fede8f7e5e31e17 100644 (file)
 
 /* SATA Configs */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 /* MMC Configs */
index 05c88b3ef85c8c8d68ab97142f18bdd16846610c..068962d6135405da53f77fdf044e4199e218b658 100644 (file)
  * SATA Configs
  */
 #ifdef CONFIG_CMD_SATA
-  #define CONFIG_DWC_AHSATA
   #define CONFIG_SYS_SATA_MAX_DEVICE   1
   #define CONFIG_DWC_AHSATA_PORT_ID    0
   #define CONFIG_DWC_AHSATA_BASE_ADDR  SATA_ARB_BASE_ADDR
   #define CONFIG_LBA48
-  #define CONFIG_LIBATA
 #endif
 
 /*
index b2b2c2500aff5f0b4860906a46952cb9412e09f4..a5a524008b4a216da740655e1ebf3bdc90124bc2 100644 (file)
@@ -33,8 +33,6 @@
 #define CONFIG_SYS_BOOTCOUNT_ADDR      0xfff3cf0c
 
 #define CONFIG_MISC_INIT_R
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    5
 #define CONFIG_SYS_SCSI_MAX_LUN                1
index d15054709ec082c206aac6cb26f4ebbe3ea7552c..af5f37cca3fbc726d59d7af57c0271e2cefdad70 100644 (file)
 #endif
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA                                AHCI_BASE_ADDR
index 794117062f4da32079ce23f8b2f0129003f27fc9..89aa952dc61ff6a9adf7773458c051d87b3e8049 100644 (file)
@@ -40,8 +40,6 @@
 #endif
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA                                AHCI_BASE_ADDR
index 46bf55f89171fdd638fab6506e56f2c7f8f1a5c4..4a63efc5ef893a3fbd9885b342c382e5101eb5b5 100644 (file)
 #define CONFIG_FSL_ESDHC
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #ifndef PCI_DEVICE_ID_FREESCALE_AHCI
 #define PCI_DEVICE_ID_FREESCALE_AHCI   0x0440
index 8cc2abb2b6bd3ed46336622fc885b5164392cabb..a7f78f46ae5079c4b715b04a15ab5bb2c9268eea 100644 (file)
@@ -94,8 +94,6 @@ unsigned long get_board_ddr_clk(void);
 #endif
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 
 /* EEPROM */
index b4b4d5e178fb6e2eddaba8976bad575cf7695038..34f82281c839ac74f3f11df5927915e9b3280db1 100644 (file)
 
 /* SATA */
 #ifndef SPL_NO_SATA
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #ifndef CONFIG_CMD_EXT2
 #define CONFIG_CMD_EXT2
 #endif
index 1713e2c031e9b04c83a0f480e6f9b481ab4ec91e..f510f2457a58d009c7ec3a488487bbad1b3b142e 100644 (file)
@@ -137,8 +137,6 @@ unsigned long get_board_ddr_clk(void);
 #endif
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 
 /* EEPROM */
index 5afd5c64bbb90081d23d39b601e70d9b2959577b..784894f0b7b94973cabbeb5fb615690b3267d894 100644 (file)
 
 /* SATA */
 #ifndef SPL_NO_SATA
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA                                AHCI_BASE_ADDR
index b99257e547a8771db38a549984fe10b48be3d76c..0cd2f3c2bc9d9f30e3c60f6c9bed954d0dcaad8e 100644 (file)
@@ -153,8 +153,6 @@ unsigned long long get_qixis_addr(void);
 
 /* SATA */
 #ifdef CONFIG_SCSI
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SATA1               AHCI_BASE_ADDR1
 
index f1968cc53353506490411ffa32d2ac144071a21a..815d8adc92a24573c8aa5103b45d33a62ed45c07 100644 (file)
@@ -46,8 +46,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_FSL_DDR_BIST    /* enable built-in memory test */
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA1                       AHCI_BASE_ADDR1
index 650db2f594d5daf7501486ee7accdfe6275d38ec..6f3301c2fdc8381bec4dac9caf2403ad11e97b9b 100644 (file)
@@ -64,8 +64,6 @@ unsigned long get_board_sys_clk(void);
 #define CONFIG_FSL_DDR_BIST    /* enable built-in memory test */
 
 /* SATA */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA1                       AHCI_BASE_ADDR1
index 29eb59a3cba1e30638c3796b61b4e83734e4003b..50379c7b21abf7912f75f66ebc7bb0f0bd55c73a 100644 (file)
  * SATA
  */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 /*
index 1b2e0d71b4583a8a80ac85e2e43c7f3e1db1dde7..af16b9454a39b39ded1f898e65f4df15522479e8 100644 (file)
@@ -96,9 +96,7 @@
 /*
  * SATA/SCSI/AHCI configuration
  */
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 #define CONFIG_SYS_64BIT_LBA
 
index d85527434a0aa5ab36dc191318be1e922449bb64..7f143164c3acd3767fbf8abe41a41bf83ee0978b 100644 (file)
@@ -96,9 +96,7 @@
 /*
  * SATA/SCSI/AHCI configuration
  */
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 #define CONFIG_SYS_64BIT_LBA
 
index e973b3569850c279af36e287df26af1c9f89f8c9..323aa3d907256edf36c9cfc4068d2e34420c5007 100644 (file)
 #define CONFIG_SYS_MMC_ENV_DEV 0
 
 #ifdef CONFIG_CMD_SATA
-       #define CONFIG_DWC_AHSATA
        #define CONFIG_SYS_SATA_MAX_DEVICE      1
        #define CONFIG_DWC_AHSATA_PORT_ID       0
        #define CONFIG_DWC_AHSATA_BASE_ADDR     SATA_BASE_ADDR
        #define CONFIG_LBA48
-       #define CONFIG_LIBATA
 #endif
 
 /* Framebuffer and LCD */
index 6b42b2b3c188c70c05389bee66fdb76c87ee7bd2..d649172d5fc8b5414ae406d3067acd8e88cce5ab 100644 (file)
 
 /* SATA Configuration */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE      1
 #define CONFIG_DWC_AHSATA_PORT_ID       0
 #define CONFIG_DWC_AHSATA_BASE_ADDR     SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 /* Ethernet Configuration */
index b847906310058ebf999f3834b5ff4fe43b327b90..8e0d6df93d5c9e2c76ce26fe9c28d2db3bc73a36 100644 (file)
  * SATA Configs
  */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 #define CONFIG_FEC_MXC
index dd0e6370629fc8e40611dc79096055cf4cb1c5cb..f82b6a44d2473875a3406b49d830452ab90d3f46 100644 (file)
 
 /* SATA Configs */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 /* UART */
index 3ecfb58918604968f432e91fa6de7e6ed4a34601..b095814cda8d32efcb179084db95eaa7376da07b 100644 (file)
@@ -93,7 +93,6 @@
 
 #define CONFIG_PREBOOT \
        "setenv preboot;"                                               \
-       "nand unlock;"                                                  \
        "saveenv;"
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
                "tftpboot $loadaddr zImage;" \
                "bootz $loadaddr\0" \
        "nandbootcommon=echo 'Booting kernel from NAND...';" \
-               "nand unlock;" \
                "run nandargs;" \
                "run common_bootargs;" \
                "run dump_bootargs;" \
index 38d74120998a0ba669040006cf4020d191bd38cb..38a00552975e0206626e55273642913db873c8b6 100644 (file)
@@ -61,8 +61,6 @@
 
 #define CONSOLEDEV             "ttyO2"
 
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
index 55e716a22aa1bcaaad154421e170173dfbf0a2eb..051416eab87548ddd32e21cc3e7cb23727ef2d30 100644 (file)
  * SATA Configs
  */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 /* SPL */
index c51ca275028658fcc4431b96b138ffb060976359..07c192aecc1d216934e5892f26ae332d9dfe858e 100644 (file)
 #define CONFIG_TSEC_ENET       /* tsec ethernet support */
 #define CONFIG_ENV_OVERWRITE
 
-#define CONFIG_SATA_SIL
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 
 #if defined(CONFIG_TARGET_P2020RDB)
index e9692048d14cf6c715da1333e203bdf2d3aa282f..d2302636ac90a79caaec9fa08024d7efaefce9f9 100644 (file)
@@ -50,9 +50,7 @@
 #define CONFIG_TSEC_ENET       /* tsec ethernet support */
 #define CONFIG_ENV_OVERWRITE
 
-#define CONFIG_SATA_SIL3114
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 
 #ifndef __ASSEMBLY__
index 4376a247876706e535c2e6aa572d3678e08e16d1..c8852cef349c0baff60a9f82f31270648d51a4fa 100644 (file)
@@ -31,8 +31,6 @@
 
 /* For block devices, QEMU emulates an ICH9 AHCI controller over PCI */
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID 6
-#define CONFIG_SCSI_AHCI
-#define CONFIG_LIBATA
 
 /* Environment options */
 #define CONFIG_ENV_SIZE                                SZ_64K
index 2815e241dec52f33ded4939c9fa3337becc8814b..30a98b8ada3e5804abac2a29805cf63a76ad8f53 100644 (file)
 #define CONFIG_SYS_BAUDRATE_TABLE      { 115200, 38400 }
 
 /* MEMORY */
+#if defined(CONFIG_R8A77970)
+#define CONFIG_SYS_TEXT_BASE           0x58280000
+#else
 #define CONFIG_SYS_TEXT_BASE           0x50000000
+#endif
 #define CONFIG_SYS_INIT_SP_ADDR                CONFIG_SYS_TEXT_BASE
 
 #define DRAM_RSV_SIZE                  0x08000000
index a0097fdbd9157c6528e62694e801f2a18b197982..817c9d920dd794192b57a0acb670dc3b571d00d3 100644 (file)
 
 #define CONFIG_PCI_SCAN_SHOW           /* show pci devices on startup */
 
-#undef CONFIG_SCSI_AHCI
-
 #ifdef CONFIG_SCSI_AHCI
 #define CONFIG_SATA_ULI5288
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    4
index 4391a8cbc82407400215695d9187c0c74b11cd97..26f889dd3eed2cb800b73d05c4bfda51fdc64743 100644 (file)
 #define PHYS_SDRAM_0_SIZE              0x80000000 /* 2 GiB */
 
 #ifdef CONFIG_AHCI
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SUNXI_AHCI
 #define CONFIG_SYS_64BIT_LBA
index 4938f43985c66fe4124271178a0ea9ab8548ea92..5a69708e30356f3e65d763a28523c46e0db8aca0 100644 (file)
 
 /* SATA */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_LIBATA
-#define CONFIG_FSL_SATA
-
 #define CONFIG_SYS_SATA_MAX_DEVICE     2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
index 849d4a6aecccce3ecae5d41e185039fced60bce1..3a3bab0fea91ef48a3ccb34638ef09d83ad93b10 100644 (file)
 
 /* SATA */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 /* USB */
index a7001e76aaac672bb844f006c6ee603af0c00e9d..6e95aa1626e509bf9ac2a7dc78764489924ae86f 100644 (file)
@@ -65,8 +65,6 @@
 
 /* SATA support */
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
-#define CONFIG_SATA_MV
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 
 /* Additional FS support/configuration */
index d2c3e575703b4d92989ea4d3fd57882926daf324..3dbd2cacbae71dbcc1ad1b9d1f9b322274519184 100644 (file)
@@ -53,8 +53,6 @@
 /*
  * SATA/SCSI/AHCI configuration
  */
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    2
 #define CONFIG_SYS_SCSI_MAX_LUN                1
index bcce41db8a4caddf1a66cc0ad9d3db3c3824c3b0..989014a177a0c11fbfde4066a5f1a083539b0c90 100644 (file)
 /* SATA Configs */
 
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 /* Network support */
index 97d193ba49c6ebd81c54e3172009d01ccc057fef..e42bfc51f8432111ebe091c9b6d7ff97618977af 100644 (file)
 /* SATA Configs */
 
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_DWC_AHSATA
 #define CONFIG_SYS_SATA_MAX_DEVICE     1
 #define CONFIG_DWC_AHSATA_PORT_ID      0
 #define CONFIG_DWC_AHSATA_BASE_ADDR    SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
-#define CONFIG_LIBATA
 #endif
 
 #define CONFIG_SYS_MEMTEST_START       0x10000000
index 6422852010742dcc4f3c29aa0cc03f0c06aa947a..064c546403627bea6d192e74beb810de5f6443d5 100644 (file)
 #define CONFIG_SYS_BOOTM_LEN           (16 << 20)
 
 /* SATA AHCI storage */
-
-#define CONFIG_SCSI_AHCI
 #ifdef CONFIG_SCSI_AHCI
-#define CONFIG_LIBATA
 #define CONFIG_LBA48
 #define CONFIG_SYS_64BIT_LBA
 
index 14604eb4e8013d1d910ae78000ba87d5f57d5d48..57fee6a4c8a562dc3c071614d39a4877f8471061 100644 (file)
 #endif
 
 #ifdef CONFIG_SATA_CEVA
-#define CONFIG_LIBATA
-#define CONFIG_SCSI_AHCI
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    2
 #define CONFIG_SYS_SCSI_MAX_LUN                1
 #define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
diff --git a/include/dt-bindings/clock/r8a77970-cpg-mssr.h b/include/dt-bindings/clock/r8a77970-cpg-mssr.h
new file mode 100644 (file)
index 0000000..4146395
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2016 Renesas Electronics Corp.
+ * Copyright (C) 2017 Cogent Embedded, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+#ifndef __DT_BINDINGS_CLOCK_R8A77970_CPG_MSSR_H__
+#define __DT_BINDINGS_CLOCK_R8A77970_CPG_MSSR_H__
+
+#include <dt-bindings/clock/renesas-cpg-mssr.h>
+
+/* r8a77970 CPG Core Clocks */
+#define R8A77970_CLK_Z2                        0
+#define R8A77970_CLK_ZR                        1
+#define R8A77970_CLK_ZTR               2
+#define R8A77970_CLK_ZTRD2             3
+#define R8A77970_CLK_ZT                        4
+#define R8A77970_CLK_ZX                        5
+#define R8A77970_CLK_S1D1              6
+#define R8A77970_CLK_S1D2              7
+#define R8A77970_CLK_S1D4              8
+#define R8A77970_CLK_S2D1              9
+#define R8A77970_CLK_S2D2              10
+#define R8A77970_CLK_S2D4              11
+#define R8A77970_CLK_LB                        12
+#define R8A77970_CLK_CL                        13
+#define R8A77970_CLK_ZB3               14
+#define R8A77970_CLK_ZB3D2             15
+#define R8A77970_CLK_DDR               16
+#define R8A77970_CLK_CR                        17
+#define R8A77970_CLK_CRD2              18
+#define R8A77970_CLK_SD0H              19
+#define R8A77970_CLK_SD0               20
+#define R8A77970_CLK_RPC               21
+#define R8A77970_CLK_RPCD2             22
+#define R8A77970_CLK_MSO               23
+#define R8A77970_CLK_CANFD             24
+#define R8A77970_CLK_CSI0              25
+#define R8A77970_CLK_FRAY              26
+#define R8A77970_CLK_CP                        27
+#define R8A77970_CLK_CPEX              28
+#define R8A77970_CLK_R                 29
+#define R8A77970_CLK_OSC               30
+
+#endif /* __DT_BINDINGS_CLOCK_R8A77970_CPG_MSSR_H__ */
diff --git a/include/dt-bindings/clock/r8a77995-cpg-mssr.h b/include/dt-bindings/clock/r8a77995-cpg-mssr.h
new file mode 100644 (file)
index 0000000..4e8ae3d
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2017 Glider bvba
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+#ifndef __DT_BINDINGS_CLOCK_R8A77995_CPG_MSSR_H__
+#define __DT_BINDINGS_CLOCK_R8A77995_CPG_MSSR_H__
+
+#include <dt-bindings/clock/renesas-cpg-mssr.h>
+
+/* r8a77995 CPG Core Clocks */
+#define R8A77995_CLK_Z2                        0
+#define R8A77995_CLK_ZG                        1
+#define R8A77995_CLK_ZTR               2
+#define R8A77995_CLK_ZT                        3
+#define R8A77995_CLK_ZX                        4
+#define R8A77995_CLK_S0D1              5
+#define R8A77995_CLK_S1D1              6
+#define R8A77995_CLK_S1D2              7
+#define R8A77995_CLK_S1D4              8
+#define R8A77995_CLK_S2D1              9
+#define R8A77995_CLK_S2D2              10
+#define R8A77995_CLK_S2D4              11
+#define R8A77995_CLK_S3D1              12
+#define R8A77995_CLK_S3D2              13
+#define R8A77995_CLK_S3D4              14
+#define R8A77995_CLK_S1D4C             15
+#define R8A77995_CLK_S3D1C             16
+#define R8A77995_CLK_S3D2C             17
+#define R8A77995_CLK_S3D4C             18
+#define R8A77995_CLK_LB                        19
+#define R8A77995_CLK_CL                        20
+#define R8A77995_CLK_ZB3               21
+#define R8A77995_CLK_ZB3D2             22
+#define R8A77995_CLK_CR                        23
+#define R8A77995_CLK_CRD2              24
+#define R8A77995_CLK_SD0H              25
+#define R8A77995_CLK_SD0               26
+#define R8A77995_CLK_SSP2              27
+#define R8A77995_CLK_SSP1              28
+#define R8A77995_CLK_RPC               29
+#define R8A77995_CLK_RPCD2             30
+#define R8A77995_CLK_ZA2               31
+#define R8A77995_CLK_ZA8               32
+#define R8A77995_CLK_Z2D               33
+#define R8A77995_CLK_CANFD             34
+#define R8A77995_CLK_MSO               35
+#define R8A77995_CLK_R                 36
+#define R8A77995_CLK_OSC               37
+#define R8A77995_CLK_LV0               38
+#define R8A77995_CLK_LV1               39
+#define R8A77995_CLK_CP                        40
+
+#endif /* __DT_BINDINGS_CLOCK_R8A77995_CPG_MSSR_H__ */
diff --git a/include/dt-bindings/clock/snps,hsdk-cgu.h b/include/dt-bindings/clock/snps,hsdk-cgu.h
new file mode 100644 (file)
index 0000000..813ab71
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Synopsys HSDK SDP CGU clock driver dts bindings
+ *
+ * Copyright (C) 2017 Synopsys
+ * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+ *
+ * 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.
+ */
+
+#ifndef __DT_BINDINGS_CLK_HSDK_CGU_H_
+#define __DT_BINDINGS_CLK_HSDK_CGU_H_
+
+#define CLK_ARC_PLL            0
+#define CLK_ARC                        1
+#define CLK_DDR_PLL            2
+#define CLK_SYS_PLL            3
+#define CLK_SYS_APB            4
+#define CLK_SYS_AXI            5
+#define CLK_SYS_ETH            6
+#define CLK_SYS_USB            7
+#define CLK_SYS_SDIO           8
+#define CLK_SYS_HDMI           9
+#define CLK_SYS_GFX_CORE       10
+#define CLK_SYS_GFX_DMA                11
+#define CLK_SYS_GFX_CFG                12
+#define CLK_SYS_DMAC_CORE      13
+#define CLK_SYS_DMAC_CFG       14
+#define CLK_SYS_SDIO_REF       15
+#define CLK_SYS_SPI_REF                16
+#define CLK_SYS_I2C_REF                17
+#define CLK_SYS_UART_REF       18
+#define CLK_SYS_EBI_REF                19
+#define CLK_TUN_PLL            20
+#define CLK_TUN                        21
+#define CLK_HDMI_PLL           22
+#define CLK_HDMI               23
+
+#endif /* __DT_BINDINGS_CLK_HSDK_CGU_H_ */
diff --git a/include/dt-bindings/power/r8a77970-sysc.h b/include/dt-bindings/power/r8a77970-sysc.h
new file mode 100644 (file)
index 0000000..bf54779
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2017 Cogent Embedded Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __DT_BINDINGS_POWER_R8A77970_SYSC_H__
+#define __DT_BINDINGS_POWER_R8A77970_SYSC_H__
+
+/*
+ * These power domain indices match the numbers of the interrupt bits
+ * representing the power areas in the various Interrupt Registers
+ * (e.g. SYSCISR, Interrupt Status Register)
+ */
+
+#define R8A77970_PD_CA53_CPU0           5
+#define R8A77970_PD_CA53_CPU1           6
+#define R8A77970_PD_CR7                        13
+#define R8A77970_PD_CA53_SCU           21
+#define R8A77970_PD_A2IR0              23
+#define R8A77970_PD_A3IR                       24
+#define R8A77970_PD_A2IR1              27
+#define R8A77970_PD_A2IR2              28
+#define R8A77970_PD_A2IR3              29
+#define R8A77970_PD_A2SC0              30
+#define R8A77970_PD_A2SC1              31
+
+/* Always-on power area */
+#define R8A77970_PD_ALWAYS_ON          32
+
+#endif /* __DT_BINDINGS_POWER_R8A77970_SYSC_H__ */
diff --git a/include/dt-bindings/power/r8a77995-sysc.h b/include/dt-bindings/power/r8a77995-sysc.h
new file mode 100644 (file)
index 0000000..09d0ed5
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 Glider bvba
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ */
+#ifndef __DT_BINDINGS_POWER_R8A77995_SYSC_H__
+#define __DT_BINDINGS_POWER_R8A77995_SYSC_H__
+
+/*
+ * These power domain indices match the numbers of the interrupt bits
+ * representing the power areas in the various Interrupt Registers
+ * (e.g. SYSCISR, Interrupt Status Register)
+ */
+
+#define R8A77995_PD_CA53_CPU0           5
+#define R8A77995_PD_CA53_SCU           21
+
+/* Always-on power area */
+#define R8A77995_PD_ALWAYS_ON          32
+
+#endif /* __DT_BINDINGS_POWER_R8A77995_SYSC_H__ */
index e9c18ce40357fb27320eb29a01e684f424ffb333..a128a623e51bc0c0a229385804042e1248c20abb 100644 (file)
@@ -887,6 +887,7 @@ int bootz_setup(ulong image, ulong *start, ulong *end);
 
 /* image node */
 #define FIT_DATA_PROP          "data"
+#define FIT_DATA_POSITION_PROP "data-position"
 #define FIT_DATA_OFFSET_PROP   "data-offset"
 #define FIT_DATA_SIZE_PROP     "data-size"
 #define FIT_TIMESTAMP_PROP     "timestamp"
@@ -968,6 +969,8 @@ int fit_image_get_entry(const void *fit, int noffset, ulong *entry);
 int fit_image_get_data(const void *fit, int noffset,
                                const void **data, size_t *size);
 int fit_image_get_data_offset(const void *fit, int noffset, int *data_offset);
+int fit_image_get_data_position(const void *fit, int noffset,
+                               int *data_position);
 int fit_image_get_data_size(const void *fit, int noffset, int *data_size);
 
 int fit_image_hash_get_algo(const void *fit, int noffset, char **algo);
index 479e2e793dcef185de6af79b30b8d4a7d13702b3..8e11af30d1831154368b5bd98e0191c2bc1304b5 100644 (file)
@@ -8,6 +8,7 @@ enum {
        EXYNOS5_BOARD_ODROID_XU3_REV01,
        EXYNOS5_BOARD_ODROID_XU3_REV02,
        EXYNOS5_BOARD_ODROID_XU4_REV01,
+       EXYNOS5_BOARD_ODROID_HC1_REV01,
        EXYNOS5_BOARD_ODROID_UNKNOWN,
 
        EXYNOS5_BOARD_COUNT,
@@ -23,5 +24,6 @@ struct odroid_rev_info {
 bool board_is_generic(void);
 bool board_is_odroidxu3(void);
 bool board_is_odroidxu4(void);
+bool board_is_odroidhc1(void);
 
 #endif
index d5ae1f468552aaafdf4ef9a73b0cee7892827ac8..2b926f7415936ed417ae977196f34d1fbf29651a 100644 (file)
@@ -45,18 +45,12 @@ CONFIG_APUS_FAST_EXCEPT
 CONFIG_AP_SH4A_4A
 CONFIG_ARCH_ADPAG101P
 CONFIG_ARCH_CPU_INIT
-CONFIG_ARCH_CSB226
 CONFIG_ARCH_HAS_ILOG2_U32
 CONFIG_ARCH_HAS_ILOG2_U64
-CONFIG_ARCH_INNOKOM
 CONFIG_ARCH_KIRKWOOD
-CONFIG_ARCH_LUBBOCK
 CONFIG_ARCH_MAP_SYSMEM
 CONFIG_ARCH_OMAP4
 CONFIG_ARCH_ORION5X
-CONFIG_ARCH_PLEB
-CONFIG_ARCH_PXA_CERF
-CONFIG_ARCH_PXA_IDP
 CONFIG_ARCH_RMOBILE_BOARD_STRING
 CONFIG_ARCH_RMOBILE_EXTRAM_BOOT
 CONFIG_ARCH_TEGRA
@@ -492,7 +486,6 @@ CONFIG_DWC2_ULPI_FS_LS
 CONFIG_DWC2_UTMI_WIDTH
 CONFIG_DWCDDR21MCTL
 CONFIG_DWCDDR21MCTL_BASE
-CONFIG_DWC_AHSATA
 CONFIG_DWC_AHSATA_BASE_ADDR
 CONFIG_DWC_AHSATA_PORT_ID
 CONFIG_DW_ALTDESCRIPTOR
@@ -754,7 +747,6 @@ CONFIG_FSL_PMIC_MODE
 CONFIG_FSL_QIXIS
 CONFIG_FSL_QIXIS_CLOCK_MEASUREMENT
 CONFIG_FSL_QIXIS_V2
-CONFIG_FSL_SATA
 CONFIG_FSL_SATA_V2
 CONFIG_FSL_SDHC_V2_3
 CONFIG_FSL_SDRAM_TYPE
@@ -1247,7 +1239,6 @@ CONFIG_LEGACY_BOOTCMD_ENV
 CONFIG_LG4573
 CONFIG_LG4573_BUS
 CONFIG_LG4573_CS
-CONFIG_LIBATA
 CONFIG_LIB_HW_RAND
 CONFIG_LIB_UUID
 CONFIG_LINUX
@@ -1459,7 +1450,6 @@ CONFIG_MVGBE
 CONFIG_MVGBE_PORTS
 CONFIG_MVMFP_V2
 CONFIG_MVS
-CONFIG_MVSATA_IDE
 CONFIG_MVSATA_IDE_USE_PORT0
 CONFIG_MVSATA_IDE_USE_PORT1
 CONFIG_MV_ETH_RXQ
@@ -1903,9 +1893,6 @@ CONFIG_SAR2_REG
 CONFIG_SAR_REG
 CONFIG_SATA1
 CONFIG_SATA2
-CONFIG_SATA_MV
-CONFIG_SATA_SIL
-CONFIG_SATA_SIL3114
 CONFIG_SATA_ULI5288
 CONFIG_SBC8349
 CONFIG_SBC8548
@@ -1915,7 +1902,6 @@ CONFIG_SCIF
 CONFIG_SCIF_A
 CONFIG_SCIF_EXT_CLOCK
 CONFIG_SCIF_USE_EXT_CLK
-CONFIG_SCSI_AHCI
 CONFIG_SCSI_AHCI_PLAT
 CONFIG_SCSI_DEV_LIST
 CONFIG_SC_TIMER_CLK
index 4329b69b7adda59f8c1d0bf495e096d6d026e24d..886df43f8bf86e2061b10a44080940584778034d 100644 (file)
@@ -44,9 +44,11 @@ class GptTestDiskImage(object):
                 cmd = ('sgdisk', '-U', '375a56f7-d6c9-4e81-b5f0-09d41ca89efe',
                     persistent)
                 u_boot_utils.run_and_log(u_boot_console, cmd)
-                cmd = ('sgdisk', '--new=1:2048:2560', '-c 1:part1', persistent)
+                # part1 offset 1MB size 1MB
+                cmd = ('sgdisk', '--new=1:2048:4095', '-c 1:part1', persistent)
+                # part2 offset 2MB size 1.5MB
                 u_boot_utils.run_and_log(u_boot_console, cmd)
-                cmd = ('sgdisk', '--new=2:4096:4608', '-c 2:part2', persistent)
+                cmd = ('sgdisk', '--new=2:4096:7167', '-c 2:part2', persistent)
                 u_boot_utils.run_and_log(u_boot_console, cmd)
                 cmd = ('sgdisk', '-l', persistent)
                 u_boot_utils.run_and_log(u_boot_console, cmd)
@@ -76,13 +78,13 @@ def test_gpt_read(state_disk_image, u_boot_console):
 
     u_boot_console.run_command('host bind 0 ' + state_disk_image.path)
     output = u_boot_console.run_command('gpt read host 0')
-    assert 'Start 1MiB, size 0MiB' in output
+    assert 'Start 1MiB, size 1MiB' in output
     assert 'Block size 512, name part1' in output
-    assert 'Start 2MiB, size 0MiB' in output
+    assert 'Start 2MiB, size 1MiB' in output
     assert 'Block size 512, name part2' in output
     output = u_boot_console.run_command('part list host 0')
-    assert '0x00000800 0x00000a00      "part1"' in output
-    assert '0x00001000 0x00001200      "part2"' in output
+    assert '0x00000800 0x00000fff      "part1"' in output
+    assert '0x00001000 0x00001bff      "part2"' in output
 
 @pytest.mark.boardspec('sandbox')
 @pytest.mark.buildconfigspec('cmd_gpt')
@@ -133,8 +135,8 @@ def test_gpt_rename_partition(state_disk_image, u_boot_console):
     output = u_boot_console.run_command('gpt read host 0')
     assert 'name second' in output
     output = u_boot_console.run_command('part list host 0')
-    assert '0x00000800 0x00000a00      "first"' in output
-    assert '0x00001000 0x00001200      "second"' in output
+    assert '0x00000800 0x00000fff      "first"' in output
+    assert '0x00001000 0x00001bff      "second"' in output
 
 @pytest.mark.boardspec('sandbox')
 @pytest.mark.buildconfigspec('cmd_gpt')
@@ -146,12 +148,12 @@ def test_gpt_swap_partitions(state_disk_image, u_boot_console):
 
     u_boot_console.run_command('host bind 0 ' + state_disk_image.path)
     output = u_boot_console.run_command('part list host 0')
-    assert '0x00000800 0x00000a00      "first"' in output
-    assert '0x00001000 0x00001200      "second"' in output
+    assert '0x00000800 0x00000fff      "first"' in output
+    assert '0x00001000 0x00001bff      "second"' in output
     u_boot_console.run_command('gpt swap host 0 first second')
     output = u_boot_console.run_command('part list host 0')
-    assert '0x00000800 0x00000a00      "second"' in output
-    assert '0x00001000 0x00001200      "first"' in output
+    assert '0x00000800 0x00000fff      "second"' in output
+    assert '0x00001000 0x00001bff      "first"' in output
 
 @pytest.mark.boardspec('sandbox')
 @pytest.mark.buildconfigspec('cmd_gpt')
@@ -165,10 +167,10 @@ def test_gpt_write(state_disk_image, u_boot_console):
     assert 'Writing GPT: success!' in output
     output = u_boot_console.run_command('part list host 0')
     assert '0x00000022 0x00001fde      "all"' in output
-    output = u_boot_console.run_command('gpt write host 0 "uuid_disk=375a56f7-d6c9-4e81-b5f0-09d41ca89efe;name=first,start=0x100000,size=0x40200;name=second,start=0x200000,size=0x40200;"')
+    output = u_boot_console.run_command('gpt write host 0 "uuid_disk=375a56f7-d6c9-4e81-b5f0-09d41ca89efe;name=first,start=1M,size=1M;name=second,start=0x200000,size=0x180000;"')
     assert 'Writing GPT: success!' in output
     output = u_boot_console.run_command('part list host 0')
-    assert '0x00000800 0x00000a00      "first"' in output
-    assert '0x00001000 0x00001200      "second"' in output
+    assert '0x00000800 0x00000fff      "first"' in output
+    assert '0x00001000 0x00001bff      "second"' in output
     output = u_boot_console.run_command('gpt guid host 0')
     assert '375a56f7-d6c9-4e81-b5f0-09d41ca89efe' in output
index 64e0571326224ba42322c780974e7281f1ce1367..ccef24d7f7b84e80847961afa79356c6b8538249 100644 (file)
@@ -5,10 +5,23 @@
 import pytest
 import time
 
+"""
+Note: This test doesn't rely on boardenv_* configuration values but they can
+change test behavior.
+
+# Setup env__sleep_accurate to False if time is not accurate on your platform
+env__sleep_accurate = False
+
+"""
+
 def test_sleep(u_boot_console):
     """Test the sleep command, and validate that it sleeps for approximately
     the correct amount of time."""
 
+    sleep_skip = u_boot_console.config.env.get('env__sleep_accurate', True)
+    if not sleep_skip:
+        pytest.skip('sleep is not accurate')
+
     if u_boot_console.config.buildconfig.get('config_cmd_misc', 'n') != 'y':
         pytest.skip('sleep command not supported')
     # 3s isn't too long, but is enough to cross a few second boundaries.