All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 14/51] imx8m: update imx-regs for i.MX8MM
Date: Mon, 8 Jul 2019 01:39:13 +0000	[thread overview]
Message-ID: <20190708015333.20411-15-peng.fan@nxp.com> (raw)
In-Reply-To: <20190708015333.20411-1-peng.fan@nxp.com>

i.MX8MM has similar architecture with i.MX8MQ, but it has totally
different PLL design and some register layout change.

Note: Some registers in this file are not updated because not used now.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/include/asm/arch-imx8m/imx-regs.h | 75 ++++++++++++++++++++++++++++--
 1 file changed, 71 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h b/arch/arm/include/asm/arch-imx8m/imx-regs.h
index 68666a535b..a5be2e85da 100644
--- a/arch/arm/include/asm/arch-imx8m/imx-regs.h
+++ b/arch/arm/include/asm/arch-imx8m/imx-regs.h
@@ -10,8 +10,8 @@
 
 #include <asm/mach-imx/regs-lcdif.h>
 
-#define ROM_VERSION_A0		0x800
-#define ROM_VERSION_B0		0x83C
+#define ROM_VERSION_A0		IS_ENABLED(CONFIG_IMX8MQ) ? 0x800 : 0x800
+#define ROM_VERSION_B0		IS_ENABLED(CONFIG_IMX8MQ) ? 0x83C : 0x800
 
 #define M4_BOOTROM_BASE_ADDR	0x007E0000
 
@@ -93,7 +93,11 @@
 #define SEMAPHOR_HS_BASE_ADDR	0x30AC0000
 #define USDHC1_BASE_ADDR	0x30B40000
 #define USDHC2_BASE_ADDR	0x30B50000
+#ifdef CONFIG_IMX8MM
+#define USDHC3_BASE_ADDR	0x30B60000
+#else
 #define MIPI_CS2_BASE_ADDR	0x30B60000
+#endif
 #define MIPI_CSI_PHY2_BASE_ADDR	0x30B70000
 #define CSI2_BASE_ADDR		0x30B80000
 #define QSPI0_BASE_ADDR		0x30BB0000
@@ -120,7 +124,8 @@
 #define USB1_PHY_BASE_ADDR	0x381F0000
 #define USB2_PHY_BASE_ADDR	0x382F0000
 
-#define MXS_LCDIF_BASE		LCDIF_BASE_ADDR
+#define MXS_LCDIF_BASE		is_enable(CONFIG_IMX8MQ) ? \
+					0x30320000 : 0x32e00000
 
 #define SRC_IPS_BASE_ADDR	0x30390000
 #define SRC_DDRC_RCR_ADDR	0x30391000
@@ -149,6 +154,9 @@
 #define SRC_DDR1_RCR_CORE_RESET_N_MASK	BIT(1)
 #define SRC_DDR1_RCR_PRESET_N_MASK	BIT(0)
 
+#define IOMUXC_GPR_GPR1_GPR_ENET1_TX_CLK_SEL_MASK 0x2000u
+#define IOMUXC_GPR_GPR1_GPR_ENET1_TX_CLK_SEL_SHIFT 13
+
 struct iomuxc_gpr_base_regs {
 	u32 gpr[47];
 };
@@ -205,6 +213,7 @@ struct fuse_bank1_regs {
 	u32 rsvd3[3];
 };
 
+#ifdef CONFIG_IMX8MQ
 struct anamix_pll {
 	u32 audio_pll1_cfg0;
 	u32 audio_pll1_cfg1;
@@ -239,6 +248,60 @@ struct anamix_pll {
 	u32 frac_pllout_div_cfg;
 	u32 sscg_pllout_div_cfg;
 };
+#else
+struct anamix_pll {
+	u32 audio_pll1_gnrl_ctl;
+	u32 audio_pll1_fdiv_ctl0;
+	u32 audio_pll1_fdiv_ctl1;
+	u32 audio_pll1_sscg_ctl;
+	u32 audio_pll1_mnit_ctl;
+	u32 audio_pll2_gnrl_ctl;
+	u32 audio_pll2_fdiv_ctl0;
+	u32 audio_pll2_fdiv_ctl1;
+	u32 audio_pll2_sscg_ctl;
+	u32 audio_pll2_mnit_ctl;
+	u32 video_pll1_gnrl_ctl;
+	u32 video_pll1_fdiv_ctl0;
+	u32 video_pll1_fdiv_ctl1;
+	u32 video_pll1_sscg_ctl;
+	u32 video_pll1_mnit_ctl;
+	u32 reserved[5];
+	u32 dram_pll_gnrl_ctl;
+	u32 dram_pll_fdiv_ctl0;
+	u32 dram_pll_fdiv_ctl1;
+	u32 dram_pll_sscg_ctl;
+	u32 dram_pll_mnit_ctl;
+	u32 gpu_pll_gnrl_ctl;
+	u32 gpu_pll_div_ctl;
+	u32 gpu_pll_locked_ctl1;
+	u32 gpu_pll_mnit_ctl;
+	u32 vpu_pll_gnrl_ctl;
+	u32 vpu_pll_div_ctl;
+	u32 vpu_pll_locked_ctl1;
+	u32 vpu_pll_mnit_ctl;
+	u32 arm_pll_gnrl_ctl;
+	u32 arm_pll_div_ctl;
+	u32 arm_pll_locked_ctl1;
+	u32 arm_pll_mnit_ctl;
+	u32 sys_pll1_gnrl_ctl;
+	u32 sys_pll1_div_ctl;
+	u32 sys_pll1_locked_ctl1;
+	u32 reserved2[24];
+	u32 sys_pll1_mnit_ctl;
+	u32 sys_pll2_gnrl_ctl;
+	u32 sys_pll2_div_ctl;
+	u32 sys_pll2_locked_ctl1;
+	u32 sys_pll2_mnit_ctl;
+	u32 sys_pll3_gnrl_ctl;
+	u32 sys_pll3_div_ctl;
+	u32 sys_pll3_locked_ctl1;
+	u32 sys_pll3_mnit_ctl;
+	u32 anamix_misc_ctl;
+	u32 anamix_clk_mnit_ctl;
+	u32 reserved3[437];
+	u32 digprog;
+};
+#endif
 
 struct fuse_bank9_regs {
 	u32 mac_addr0;
@@ -258,11 +321,13 @@ struct src {
 	u32 usbophy2_rcr;
 	u32 mipiphy_rcr;
 	u32 pciephy_rcr;
+	/* Exits on i.MX8MQ */
 	u32 hdmi_rcr;
 	u32 disp_rcr;
 	u32 reserved2[2];
 	u32 gpu_rcr;
 	u32 vpu_rcr;
+	/* The following four exits on i.MX8MQ */
 	u32 pcie2_rcr;
 	u32 mipiphy1_rcr;
 	u32 mipiphy2_rcr;
@@ -285,6 +350,7 @@ struct src {
 	u32 gpr10;
 	u32 reserved5[985];
 	u32 ddr1_rcr;
+	/* Exist on i.MX8MQ */
 	u32 ddr2_rcr;
 };
 
@@ -459,7 +525,8 @@ struct bootrom_sw_info {
 	u32 reserved_3[3];
 };
 
-#define ROM_SW_INFO_ADDR_B0	0x00000968
+#define ROM_SW_INFO_ADDR_B0	(IS_ENABLED(CONFIG_IMX8MQ) ? 0x00000968 :\
+				 0x000009e8)
 #define ROM_SW_INFO_ADDR_A0	0x000009e8
 
 #define ROM_SW_INFO_ADDR is_soc_rev(CHIP_REV_1_0) ? \
-- 
2.16.4

  parent reply	other threads:[~2019-07-08  1:39 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08  1:38 [U-Boot] [PATCH V2 00/51] Support i.MX8MM/N Peng Fan
2019-07-08  1:38 ` [U-Boot] [PATCH V2 01/51] linux: compat: guard PAGE_SIZE Peng Fan
2019-07-08  1:38 ` [U-Boot] [PATCH V2 02/51] dm: clk: ignore default settings when node not valid Peng Fan
2019-07-08  1:38 ` [U-Boot] [PATCH V2 03/51] pinctrl: imx: use devfdt_get_addr_size_index Peng Fan
2019-07-08  1:38 ` [U-Boot] [PATCH V2 04/51] i2c: mxc: add CONFIG_CLK support Peng Fan
2019-07-10  8:03   ` Lukasz Majewski
2019-07-10  8:19     ` Peng Fan
2019-07-10 14:10   ` Schrempf Frieder
2019-07-11  6:43     ` Peng Fan
2019-07-08  1:38 ` [U-Boot] [PATCH V2 05/51] tools: imx8m_image: align spl bin image size Peng Fan
2019-07-08  1:38 ` [U-Boot] [PATCH V2 06/51] ddr: imx8m: fix ddr firmware location when enable SPL OF Peng Fan
2019-07-08  1:38 ` [U-Boot] [PATCH V2 07/51] tools: imx8mimage: fix HDMI/FIT parsing Peng Fan
2019-07-08  1:38 ` [U-Boot] [PATCH V2 08/51] imx8m: add image cfg for i.MX8MM lpddr4 Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 09/51] imx: add IMX8MQ kconfig entry Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 10/51] imx: add IMX8MM " Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 11/51] imx: imx8mm: add clock bindings header Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 12/51] imx: add i.MX8MM cpu type Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 13/51] imx: spl: add spl_board_boot_device for i.MX8MM Peng Fan
2019-07-08  1:39 ` Peng Fan [this message]
2019-07-08  1:39 ` [U-Boot] [PATCH V2 15/51] imx: add get_cpu_rev support " Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 16/51] imx8m: rename clock to clock_imx8mq Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 17/51] imx8m: restructure clock.h Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 18/51] imx8m: add clk support for i.MX8MM Peng Fan
2019-07-08  9:07   ` Lukasz Majewski
2019-07-08  9:32     ` Peng Fan
2019-07-08 10:13       ` Lukasz Majewski
2019-07-10  0:49     ` Peng Fan
2019-07-10  7:22       ` Lukasz Majewski
2019-07-10  8:22         ` Peng Fan
2019-07-10  8:47           ` Lukasz Majewski
2019-07-08  1:39 ` [U-Boot] [PATCH V2 19/51] imx8m: soc: probe clk before relocation Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 20/51] imx8m: add pin header for i.MX8MM Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 21/51] imx: add i.MX8MM PE property Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 22/51] imx8m: Fix MMU table issue for OPTEE memory Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 23/51] imx8m: set BYPASS ID SWAP to avoid AXI bus errors Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 24/51] imx8m: Configure trustzone region 0 for non-secure access Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 25/51] imx8m: soc: enable SCTR clock before timer init Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 26/51] serial: Kconfig: make MXC_UART usable for MX7 and IMX8M Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 27/51] clk: imx: add Kconfig entry for i.MX8MM Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 28/51] clk: imx: add i.MX8MM clk driver Peng Fan
2019-07-10 14:22   ` Schrempf Frieder
2019-07-08  1:39 ` [U-Boot] [PATCH V2 29/51] imx: add i.MX8MM EVK board support Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 30/51] ddr: imx8m: Fix ddr4 driver build issue Peng Fan
2019-07-08  1:39 ` [U-Boot] [PATCH V2 31/51] imx8mq: Update the ddrc QoS setting for B1 chip Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 32/51] driver: ddr: Refine the ddr init driver on imx8m Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 33/51] ddr: imx8m: Fix the ddr init hang on imx8mq Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 34/51] imx: add i.MX8MN kconfig entry Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 35/51] imx8mn: support get_cpu_rev Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 36/51] imx8m: add clk support for i.MX8MN Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 37/51] imx8mn: set BYPASS ID SWAP to avoid AXI bus errors Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 38/51] imx: add i.MX8MN PE property Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 39/51] imx8mn: add pin header Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 40/51] imx: spl: use spl_board_boot_device for i.MX8MN Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 41/51] spl: pass args to board_return_to_bootrom Peng Fan
2019-07-10  6:23   ` Kever Yang
2019-07-10  8:09   ` Philipp Tomsich
2019-07-08  1:40 ` [U-Boot] [PATCH V2 42/51] imx: add rom api support Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 43/51] imx: cpu: restrict get_boot_device Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 44/51] imx8mn: add get_boot_device Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 45/51] tools: imx8mimage: add ROM VERSION Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 46/51] pinctrl: imx8m: support i.MX8MN Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 47/51] tools: imx8m_image: support ddr4 firmware Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 48/51] clk: imx: add i.MX8MN clk support Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 49/51] imx8m: add i.MX8MN ddr4 image cfg file Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 50/51] imx: add dtsi for i.MX8MN Peng Fan
2019-07-10  8:08   ` Lukasz Majewski
2019-07-10  8:09     ` Peng Fan
2019-07-10  8:44       ` Lukasz Majewski
2019-07-10  8:50         ` Peng Fan
2019-07-08  1:40 ` [U-Boot] [PATCH V2 51/51] imx: add i.MX8MN DDR4 board support Peng Fan
2019-07-10  8:34   ` Lukasz Majewski
2019-07-10 10:05     ` Peng Fan
2019-07-10 12:18       ` Lukasz Majewski
2019-07-08  8:47 ` [U-Boot] [PATCH V2 00/51] Support i.MX8MM/N Schrempf Frieder
2019-07-08  8:49   ` Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190708015333.20411-15-peng.fan@nxp.com \
    --to=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.