Skip to contentSkip to conversation

ARM: rmobile: Fix CPGWPR Address define and Settings on Gen3

PATCH New Marek Vasut 1 participant 9 messages Oct 18, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/9 ARM: rmobile: Fix CPGWPR Address define and Settings on Gen3

From: Hiroyuki Yokoyama <[email protected]>

This patch fixes the write-protect control of CPG.

---
 board/renesas/draak/draak.c           | 4 ++--
 board/renesas/salvator-x/salvator-x.c | 4 ++--
 board/renesas/ulcb/ulcb.c             | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
board/renesas/draak/draak.c +2 -2
index 852fdda843..e7f0bd7b65 100644
@@ -27,7 +27,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #define CPGWPCR	0xE6150904
-#define CPGWPR  0xE615090C
+#define CPGWPR  0xE6150900
 
 #define CLK2MHZ(clk)	(clk / 1000 / 1000)
 void s_init(void)
@@ -39,8 +39,8 @@ void s_init(void)
 	writel(0xA5A5A500, &rwdt->rwtcsra);
 	writel(0xA5A5A500, &swdt->swtcsra);
 
+	writel(0x5A5AFFFF, CPGWPR);
 	writel(0xA5A50000, CPGWPCR);
-	writel(0xFFFFFFFF, CPGWPR);
 }
 
 #define GSX_MSTP112		BIT(12)	/* 3DG */
board/renesas/salvator-x/salvator-x.c +2 -2
index 00256bc1a3..746403a5c5 100644
@@ -28,7 +28,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #define CPGWPCR	0xE6150904
-#define CPGWPR  0xE615090C
+#define CPGWPR  0xE6150900
 
 #define CLK2MHZ(clk)	(clk / 1000 / 1000)
 void s_init(void)
@@ -40,8 +40,8 @@ void s_init(void)
 	writel(0xA5A5A500, &rwdt->rwtcsra);
 	writel(0xA5A5A500, &swdt->swtcsra);
 
+	writel(0x5A5AFFFF, CPGWPR);
 	writel(0xA5A50000, CPGWPCR);
-	writel(0xFFFFFFFF, CPGWPR);
 }
 
 #define GSX_MSTP112		BIT(12)	/* 3DG */
board/renesas/ulcb/ulcb.c +2 -2
index 213e869ebe..dfe8efd3ac 100644
@@ -27,7 +27,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #define CPGWPCR	0xE6150904
-#define CPGWPR  0xE615090C
+#define CPGWPR  0xE6150900
 
 #define CLK2MHZ(clk)	(clk / 1000 / 1000)
 void s_init(void)
@@ -39,8 +39,8 @@ void s_init(void)
 	writel(0xA5A5A500, &rwdt->rwtcsra);
 	writel(0xA5A5A500, &swdt->swtcsra);
 
+	writel(0x5A5AFFFF, CPGWPR);
 	writel(0xA5A50000, CPGWPCR);
-	writel(0xFFFFFFFF, CPGWPR);
 }
 
 #define GSX_MSTP112		BIT(12)	/* 3DG */
Signature · 1 line
2.18.0
#1 lore raw

PATCH 2/9 ARM: rmobile: Remove console parameter from bootargs on Gen3

From: Hiroyuki Yokoyama <[email protected]>

This patch removes 'console=' argument, because kernel uses stdout-path as parameter.

---
 configs/r8a7795_salvator-x_defconfig  | 2 +-
 configs/r8a7795_ulcb_defconfig        | 2 +-
 configs/r8a77965_salvator-x_defconfig | 2 +-
 configs/r8a7796_salvator-x_defconfig  | 2 +-
 configs/r8a7796_ulcb_defconfig        | 2 +-
 configs/r8a77970_eagle_defconfig      | 2 +-
 configs/r8a77990_ebisu_defconfig      | 2 +-
 configs/r8a77995_draak_defconfig      | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
configs/r8a7795_salvator-x_defconfig +1 -1
index aae38e84a0..40712a44c3 100644
@@ -8,7 +8,7 @@ CONFIG_SMBIOS_PRODUCT_NAME=""
 CONFIG_FIT=y
 # 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_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="r8a7795-salvator-x.dtb"
 CONFIG_VERSION_VARIABLE=y
configs/r8a7795_ulcb_defconfig +1 -1
index c341e1aaac..f1d150b5a0 100644
@@ -8,7 +8,7 @@ CONFIG_SMBIOS_PRODUCT_NAME=""
 CONFIG_FIT=y
 # 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_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="r8a7795-h3ulcb.dtb"
 CONFIG_VERSION_VARIABLE=y
configs/r8a77965_salvator-x_defconfig +1 -1
index 567f63977e..72549e2836 100644
@@ -9,7 +9,7 @@ CONFIG_SMBIOS_PRODUCT_NAME=""
 CONFIG_FIT=y
 # 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_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="r8a77965-salvator-x.dtb"
 CONFIG_VERSION_VARIABLE=y
configs/r8a7796_salvator-x_defconfig +1 -1
index e3551a8007..7c39268a43 100644
@@ -9,7 +9,7 @@ CONFIG_SMBIOS_PRODUCT_NAME=""
 CONFIG_FIT=y
 # 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_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="r8a7796-salvator-x.dtb"
 CONFIG_VERSION_VARIABLE=y
configs/r8a7796_ulcb_defconfig +1 -1
index 8086261637..ef5c9443f9 100644
@@ -9,7 +9,7 @@ CONFIG_SMBIOS_PRODUCT_NAME=""
 CONFIG_FIT=y
 # 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_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="r8a7796-m3ulcb.dtb"
 CONFIG_VERSION_VARIABLE=y
configs/r8a77970_eagle_defconfig +1 -1
index 0cd47c1203..67ef2632a9 100644
@@ -9,7 +9,7 @@ CONFIG_SMBIOS_PRODUCT_NAME=""
 CONFIG_FIT=y
 # 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_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="r8a77970-eagle.dtb"
 CONFIG_VERSION_VARIABLE=y
configs/r8a77990_ebisu_defconfig +1 -1
index 4f9ebad23d..7363310d52 100644
@@ -9,7 +9,7 @@ CONFIG_SMBIOS_PRODUCT_NAME=""
 CONFIG_FIT=y
 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
 CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttySC0,115200"
+CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="r8a77990-ebisu.dtb"
 CONFIG_VERSION_VARIABLE=y
configs/r8a77995_draak_defconfig +1 -1
index ca89a12b7b..0f1189b671 100644
@@ -9,7 +9,7 @@ CONFIG_SMBIOS_PRODUCT_NAME=""
 CONFIG_FIT=y
 # 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_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_DEFAULT_FDT_FILE="r8a77995-draak.dtb"
 CONFIG_VERSION_VARIABLE=y
Signature · 1 line
2.18.0
#2 lore raw

PATCH 3/9 ARM: rmobile: Remove TMU0/TMU1 settings on Gen3

In reply to Marek Vasut

From: Hiroyuki Yokoyama <[email protected]>

U-Boot uses ARM generic timer, TMU0 and TMU1 are not used, remove them.

---
 board/renesas/draak/draak.c           | 5 -----
 board/renesas/eagle/eagle.c           | 5 -----
 board/renesas/ebisu/ebisu.c           | 5 -----
 board/renesas/salvator-x/salvator-x.c | 5 -----
 board/renesas/ulcb/ulcb.c             | 5 -----
 5 files changed, 25 deletions(-)
board/renesas/draak/draak.c +0 -5
index e7f0bd7b65..f9ae74a39d 100644
@@ -44,17 +44,12 @@ void s_init(void)
 }
 
 #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);
board/renesas/eagle/eagle.c +0 -5
index 9317410071..0e5efea19d 100644
@@ -50,17 +50,12 @@ void s_init(void)
 	clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc);
 }
 
-#define TMU0_MSTP125		BIT(25)	/* secure */
-
 int board_early_init_f(void)
 {
 	/* Unlock CPG access */
 	writel(0xA5A5FFFF, CPGWPR);
 	writel(0x5A5A0000, CPGWPCR);
 
-	/* TMU0 */
-	mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
-
 	return 0;
 }
 
board/renesas/ebisu/ebisu.c +0 -5
index 248223b444..5d8b79eee3 100644
@@ -30,13 +30,8 @@ void s_init(void)
 {
 }
 
-#define TMU0_MSTP125		BIT(25)	/* secure */
-
 int board_early_init_f(void)
 {
-	/* TMU0 */
-	mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
-
 	return 0;
 }
 
board/renesas/salvator-x/salvator-x.c +0 -5
index 746403a5c5..cb5228a0bd 100644
@@ -45,17 +45,12 @@ void s_init(void)
 }
 
 #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);
board/renesas/ulcb/ulcb.c +0 -5
index dfe8efd3ac..fca6eae1fb 100644
@@ -44,17 +44,12 @@ void s_init(void)
 }
 
 #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);
Signature · 1 line
2.18.0
#3 lore raw

PATCH 4/9 ARM: rmobile: Remove Watchdog and CPG settings on Gen3

In reply to Marek Vasut

From: Hiroyuki Yokoyama <[email protected]>

This code is unnecessary, because these registers are set by the initial program loader (IPL).

---
 board/renesas/draak/draak.c           | 13 -------------
 board/renesas/salvator-x/salvator-x.c | 13 -------------
 board/renesas/ulcb/ulcb.c             | 13 -------------
 3 files changed, 39 deletions(-)
board/renesas/draak/draak.c +0 -13
index f9ae74a39d..71fd5001c4 100644
@@ -26,21 +26,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define CPGWPCR	0xE6150904
-#define CPGWPR  0xE6150900
-
-#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(0x5A5AFFFF, CPGWPR);
-	writel(0xA5A50000, CPGWPCR);
 }
 
 #define GSX_MSTP112		BIT(12)	/* 3DG */
board/renesas/salvator-x/salvator-x.c +0 -13
index cb5228a0bd..296aa90a12 100644
@@ -27,21 +27,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define CPGWPCR	0xE6150904
-#define CPGWPR  0xE6150900
-
-#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(0x5A5AFFFF, CPGWPR);
-	writel(0xA5A50000, CPGWPCR);
 }
 
 #define GSX_MSTP112		BIT(12)	/* 3DG */
board/renesas/ulcb/ulcb.c +0 -13
index fca6eae1fb..a7ca274f34 100644
@@ -26,21 +26,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define CPGWPCR	0xE6150904
-#define CPGWPR  0xE6150900
-
-#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(0x5A5AFFFF, CPGWPR);
-	writel(0xA5A50000, CPGWPCR);
 }
 
 #define GSX_MSTP112		BIT(12)	/* 3DG */
Signature · 1 line
2.18.0
#4 lore raw

PATCH 5/9 ARM: rmobile: salvator-x: Remove GSX clock force supply

In reply to Marek Vasut

From: Hiroyuki Yokoyama <[email protected]>

GSX clock force supply code is unnecessary at U-Boot, because GSX clock control is supported at the kernel driver.

---
 board/renesas/salvator-x/salvator-x.c | 12 ------------
 1 file changed, 12 deletions(-)
board/renesas/salvator-x/salvator-x.c +0 -12
index 296aa90a12..726a236af3 100644
@@ -31,7 +31,6 @@ void s_init(void)
 {
 }
 
-#define GSX_MSTP112		BIT(12)	/* 3DG */
 #define SCIF2_MSTP310		BIT(10)	/* SCIF2 */
 #define DVFS_MSTP926		BIT(26)
 #define HSUSB_MSTP704		BIT(4)	/* HSUSB */
@@ -60,20 +59,9 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
-	u32 cpu_type = rmobile_get_cpu_type();
-
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000;
 
-	if (cpu_type == RMOBILE_CPU_TYPE_R8A7795) {
-		/* GSX: force power and clock supply */
-		writel(0x0000001F, SYSC_PWRONCR2);
-		while (readl(SYSC_PWRSR2) != 0x000003E0)
-			mdelay(20);
-
-		mstp_clrbits_le32(MSTPSR1, SMSTPCR1, GSX_MSTP112);
-	}
-
 	/* USB1 pull-up */
 	setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN);
 
Signature · 1 line
2.18.0
#5 lore raw

PATCH 6/9 ARM: rmobile: Tidy up SYSC_PWRx define of 3DG on Gen3

In reply to Marek Vasut

From: Hiroyuki Yokoyama <[email protected]>

Tidy up unused definition related to power control of 3DG.

---
 board/renesas/draak/draak.c           | 6 ------
 board/renesas/salvator-x/salvator-x.c | 6 ------
 board/renesas/ulcb/ulcb.c             | 6 ------
 3 files changed, 18 deletions(-)
board/renesas/draak/draak.c +0 -6
index 71fd5001c4..060343dfe4 100644
@@ -44,12 +44,6 @@ int board_early_init_f(void)
 	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)
board/renesas/salvator-x/salvator-x.c +0 -6
index 726a236af3..a1a1531663 100644
@@ -44,12 +44,6 @@ int board_early_init_f(void)
 	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)
board/renesas/ulcb/ulcb.c +0 -6
index a7ca274f34..e549a2efac 100644
@@ -44,12 +44,6 @@ int board_early_init_f(void)
 	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)
Signature · 1 line
2.18.0
#6 lore raw

PATCH 7/9 ARM: rmobile: Enable cache command on Gen3

In reply to Marek Vasut

From: Hiroyuki Yokoyama <[email protected]>

This patch enables the cache command, mostly for convenience of testing.

---
 arch/arm/mach-rmobile/Kconfig        | 1 +
 configs/r8a7795_salvator-x_defconfig | 1 +
 include/configs/draak.h              | 1 -
 3 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-rmobile/Kconfig +1 -0
index ac08d6eb12..d82023acf3 100644
@@ -12,6 +12,7 @@ config RCAR_GEN3
 	bool "Renesas ARM SoCs R-Car Gen3 (64bit)"
 	select ARM64
 	select PHY
+	select CMD_CACHE
 
 endchoice
 
configs/r8a7795_salvator-x_defconfig +1 -0
index 40712a44c3..87870fc595 100644
@@ -21,6 +21,7 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
include/configs/draak.h +0 -1
index 5d1da21e99..70c4f166a5 100644
@@ -33,6 +33,5 @@
 #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 */
Signature · 1 line
2.18.0
#7 lore raw

PATCH 8/9 ARM: rmobile: Fix module clock controls refer status on Gen3

In reply to Marek Vasut

From: Hiroyuki Yokoyama <[email protected]>

When referring to the MSTPSR register, it contains the clock status of SYS, RT, SECURE, and controlling SMSTPCR using this value has the problem of being affected by the RT and SECURE status.This patch changes the reference register to SMSTPCR.

---
 board/renesas/draak/draak.c           | 4 ++--
 board/renesas/salvator-x/salvator-x.c | 4 ++--
 board/renesas/ulcb/ulcb.c             | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
board/renesas/draak/draak.c +2 -2
index 060343dfe4..8f3d3915f7 100644
@@ -39,7 +39,7 @@ int board_early_init_f(void)
 {
 #if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
 	/* DVFS for reset */
-	mstp_clrbits_le32(MSTPSR9, SMSTPCR9, DVFS_MSTP926);
+	mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926);
 #endif
 	return 0;
 }
@@ -60,7 +60,7 @@ int board_init(void)
 	setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN);
 
 	/* Configure the HSUSB block */
-	mstp_clrbits_le32(MSTPSR7, SMSTPCR7, HSUSB_MSTP704);
+	mstp_clrbits_le32(SMSTPCR7, SMSTPCR7, HSUSB_MSTP704);
 	/* Choice USB0SEL */
 	clrsetbits_le32(HSUSB_REG_UGCTRL2, HSUSB_REG_UGCTRL2_USB0SEL,
 			HSUSB_REG_UGCTRL2_USB0SEL_EHCI);
board/renesas/salvator-x/salvator-x.c +2 -2
index a1a1531663..8b15267d7b 100644
@@ -39,7 +39,7 @@ int board_early_init_f(void)
 {
 #if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
 	/* DVFS for reset */
-	mstp_clrbits_le32(MSTPSR9, SMSTPCR9, DVFS_MSTP926);
+	mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926);
 #endif
 	return 0;
 }
@@ -60,7 +60,7 @@ int board_init(void)
 	setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN);
 
 	/* Configure the HSUSB block */
-	mstp_clrbits_le32(MSTPSR7, SMSTPCR7, HSUSB_MSTP704);
+	mstp_clrbits_le32(SMSTPCR7, SMSTPCR7, HSUSB_MSTP704);
 	/* Choice USB0SEL */
 	clrsetbits_le32(HSUSB_REG_UGCTRL2, HSUSB_REG_UGCTRL2_USB0SEL,
 			HSUSB_REG_UGCTRL2_USB0SEL_EHCI);
board/renesas/ulcb/ulcb.c +2 -2
index e549a2efac..63550af1f0 100644
@@ -39,7 +39,7 @@ int board_early_init_f(void)
 {
 #if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH)
 	/* DVFS for reset */
-	mstp_clrbits_le32(MSTPSR9, SMSTPCR9, DVFS_MSTP926);
+	mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926);
 #endif
 	return 0;
 }
@@ -60,7 +60,7 @@ int board_init(void)
 	setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN);
 
 	/* Configure the HSUSB block */
-	mstp_clrbits_le32(MSTPSR7, SMSTPCR7, HSUSB_MSTP704);
+	mstp_clrbits_le32(SMSTPCR7, SMSTPCR7, HSUSB_MSTP704);
 	/* Choice USB0SEL */
 	clrsetbits_le32(HSUSB_REG_UGCTRL2, HSUSB_REG_UGCTRL2_USB0SEL,
 			HSUSB_REG_UGCTRL2_USB0SEL_EHCI);
Signature · 1 line
2.18.0
#8 lore raw

PATCH 9/9 ARM: dts: rmobile: r8a77990: Add USB2.0(EHCI) DT nodes on Ebisu

In reply to Marek Vasut

From: Hiroyuki Yokoyama <[email protected]>

Add device tree nodes for USB2.0(EHCI) on R-Car E3 Ebisu board.

---
 arch/arm/dts/r8a77990-ebisu.dts           | 16 ++++++++++
 arch/arm/dts/r8a77990.dtsi                | 38 +++++++++++++++++++++++
 include/dt-bindings/power/r8a77990-sysc.h | 20 ++++++++++++
 3 files changed, 74 insertions(+)
 create mode 100644 include/dt-bindings/power/r8a77990-sysc.h
arch/arm/dts/r8a77990-ebisu.dts +16 -0
index 8b0d24bd29..5e3c195d4c 100644
@@ -65,6 +65,10 @@
 	};
 };
 
+&ehci0 {
+	status = "okay";
+};
+
 &extal_clk {
 	clock-frequency = <48000000>;
 };
@@ -101,6 +105,18 @@
 		function = "sdhi3";
 		power-source = <1800>;
 	};
+
+	usb0_pins: usb0 {
+		groups = "usb0";
+		function = "usb0";
+	};
+};
+
+&usb2_phy0 {
+	pinctrl-0 = <&usb0_pins>;
+	pinctrl-name = "default";
+
+	status = "okay";
 };
 
 &sdhi0 {
arch/arm/dts/r8a77990.dtsi +38 -0
index 6d2d5e1068..ad20ea14cd 100644
@@ -7,6 +7,7 @@
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/r8a77990-sysc.h>
 
 / {
 	compatible = "renesas,r8a77990";
@@ -165,6 +166,43 @@
 			resets = <&cpg 906>;
 		};
 
+		ohci0: usb at 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 R8A77990_PD_ALWAYS_ON>;
+			resets = <&cpg 703>;
+			status = "disabled";
+		};
+
+		ehci0: usb at 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 R8A77990_PD_ALWAYS_ON>;
+			resets = <&cpg 703>;
+			status = "disabled";
+		};
+
+		usb2_phy0: usb-phy at ee080200 {
+			compatible = "renesas,usb2-phy-r8a7790",
+				     "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 R8A77990_PD_ALWAYS_ON>;
+			resets = <&cpg 703>;
+			#phy-cells = <0>;
+			status = "disabled";
+		};
+
 		pfc: pin-controller at e6060000 {
 			compatible = "renesas,pfc-r8a77990";
 			reg = <0 0xe6060000 0 0x508>;
include/dt-bindings/power/r8a77990-sysc.h new file +20 -0
new file mode 100644
index 0000000000..1409c73a57
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2018 Renesas Electronics Corp.
+ */
+#ifndef __DT_BINDINGS_POWER_R8A77990_SYSC_H__
+#define __DT_BINDINGS_POWER_R8A77990_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 R8A77990_PD_CA53_CPU0		 5
+#define R8A77990_PD_CA53_SCU		21
+
+/* Always-on power area */
+#define R8A77990_PD_ALWAYS_ON		32
+
+#endif /* __DT_BINDINGS_POWER_R8A77990_SYSC_H__ */
Signature · 1 line
2.18.0