mbox series

[U-Boot,00/52] Support i.MX8MM/N

Message ID 20190702023206.48995-1-peng.fan@nxp.com
Headers show
Series Support i.MX8MM/N | expand

Message

Peng Fan July 2, 2019, 2:31 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

This patchset is to support i.MX8MM/8MN with some update
in ddr settings and ddr driver update.

The initial patchset to support i.MX8MM is
https://patchwork.ozlabs.org/cover/1093140/
But in this patchset I dropped CCF, and use original CLK uclass, so
not use V2 in patchset.

Bai Ping (1):
  imx8mq: Update the ddrc QoS setting for B1 chip

Jacky Bai (2):
  driver: ddr: Refine the ddr init driver on imx8m
  ddr: imx8m: Fix the ddr init hang on imx8mq

Peng Fan (47):
  linux: compat: guard PAGE_SIZE
  dm: clk: ignore default settings when node not valid
  pinctrl: imx: use devfdt_get_addr_size_index
  i2c: mxc: add CONFIG_CLK support
  tools: imx8m_image: align spl bin image size
  ddr: imx8m: fix ddr firmware location when enable SPL OF
  tools: imx8mimage: fix HDMI/FIT parsing
  imx8m: add image cfg for i.MX8MM lpddr4
  imx: add IMX8MQ kconfig entry
  imx: add IMX8MM kconfig entry
  imx: imx8mm: add clock bindings header
  imx: add i.MX8MM cpu type
  imx: spl: add spl_board_boot_device for i.MX8MM
  imx8m: update imx-regs for i.MX8MM
  imx: add get_cpu_rev support for i.MX8MM
  imx8m: rename clock to clock_imx8mq
  imx8m: restructure clock.h
  imx8m: add clk support for i.MX8MM
  imx8m: soc: probe clk before relocation
  imx8m: add pin header for i.MX8MM
  imx: add i.MX8MM PE property
  imx8m: Fix MMU table issue for OPTEE memory
  imx8m: set BYPASS ID SWAP to avoid AXI bus errors
  imx8m: soc: enable SCTR clock before timer init
  serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
  clk: imx: add Kconfig entry for i.MX8MM
  clk: imx: add i.MX8MM clk driver
  imx: add i.MX8MM EVK board support
  imx: add i.MX8MN kconfig entry
  imx8mn: support get_cpu_rev
  imx8m: add clk support for i.MX8MN
  imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
  imx: add i.MX8MN PE property
  imx8mn: add pin header
  imx: spl: use spl_board_boot_device for i.MX8MN
  spl: pass args to board_return_to_bootrom
  imx: add rom api support
  imx: cpu: restrict get_boot_device
  imx8mn: add get_boot_device
  power: pmic: add SPL_DM_PMIC
  tools: imx8mimage: add ROM VERSION
  pinctrl: imx8m: support i.MX8MN
  tools: imx8m_image: support ddr4 firmware
  clk: imx: add i.MX8MN clk support
  imx8m: add i.MX8MN ddr4 image cfg file
  imx: add dtsi for i.MX8MN
  imx: add i.MX8MN DDR4 board support

Ye Li (2):
  imx8m: Configure trustzone region 0 for non-secure access
  ddr: imx8m: Fix ddr4 driver build issue

 arch/arm/dts/Makefile                              |    4 +-
 arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92 +
 arch/arm/dts/imx8mm-evk.dts                        |  235 +++
 arch/arm/dts/imx8mm-pinfunc.h                      |  629 +++++++
 arch/arm/dts/imx8mm.dtsi                           |  733 ++++++++
 arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
 arch/arm/dts/imx8mn-ddr4-evk.dts                   |  221 +++
 arch/arm/dts/imx8mn-pinfunc.h                      |  646 +++++++
 arch/arm/dts/imx8mn.dtsi                           |  712 +++++++
 arch/arm/include/asm/arch-imx/cpu.h                |    7 +
 arch/arm/include/asm/arch-imx8m/clock.h            |  494 +----
 arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |  465 +++++
 arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424 +++++
 arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75 +-
 arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |  691 +++++++
 arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763 ++++++++
 arch/arm/include/asm/mach-imx/iomux-v3.h           |    4 +
 arch/arm/include/asm/mach-imx/mxc_i2c.h            |    2 +
 arch/arm/include/asm/mach-imx/sys_proto.h          |   42 +
 arch/arm/mach-imx/Kconfig                          |    4 +
 arch/arm/mach-imx/Makefile                         |    2 +
 arch/arm/mach-imx/cpu.c                            |   16 +-
 arch/arm/mach-imx/imx8m/Kconfig                    |   28 +-
 arch/arm/mach-imx/imx8m/Makefile                   |    4 +-
 arch/arm/mach-imx/imx8m/clock_imx8mm.c             |  707 +++++++
 .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
 arch/arm/mach-imx/imx8m/clock_slice.c              |  815 ++++++++
 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |   16 +
 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |   17 +
 arch/arm/mach-imx/imx8m/soc.c                      |  162 +-
 arch/arm/mach-imx/spl.c                            |    8 +
 arch/arm/mach-imx/spl_imx_romapi.c                 |  292 +++
 arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5 +-
 arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5 +-
 arch/arm/mach-rockchip/rk3399-board-spl.c          |    5 +-
 arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5 +-
 board/freescale/imx8mm_evk/Kconfig                 |   12 +
 board/freescale/imx8mm_evk/MAINTAINERS             |    6 +
 board/freescale/imx8mm_evk/Makefile                |   12 +
 board/freescale/imx8mm_evk/imx8mm_evk.c            |   90 +
 board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980 ++++++++++++++++++++
 board/freescale/imx8mm_evk/spl.c                   |  216 +++
 board/freescale/imx8mn_evk/Kconfig                 |   14 +
 board/freescale/imx8mn_evk/MAINTAINERS             |    6 +
 board/freescale/imx8mn_evk/Makefile                |   12 +
 board/freescale/imx8mn_evk/ddr4_timing.c           | 1214 ++++++++++++
 board/freescale/imx8mn_evk/imx8mn_evk.c            |   85 +
 board/freescale/imx8mn_evk/spl.c                   |   91 +
 board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
 common/spl/spl_bootrom.c                           |    7 +-
 configs/imx8mm_evk_defconfig                       |   51 +
 configs/imx8mn_ddr4_evk_defconfig                  |   55 +
 drivers/clk/clk-uclass.c                           |    3 +
 drivers/clk/imx/Kconfig                            |   14 +
 drivers/clk/imx/Makefile                           |    1 +
 drivers/clk/imx/clk-imx8mm.c                       |  121 ++
 drivers/ddr/imx/imx8m/Kconfig                      |    6 +
 drivers/ddr/imx/imx8m/Makefile                     |    4 +-
 drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
 drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
 drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
 drivers/ddr/imx/imx8m/helper.c                     |   22 +-
 drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
 drivers/i2c/mxc_i2c.c                              |   24 +-
 drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
 drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
 drivers/power/pmic/Kconfig                         |   12 +
 drivers/power/pmic/Makefile                        |    2 +-
 drivers/serial/Kconfig                             |    2 +-
 include/configs/imx8mm_evk.h                       |  200 ++
 include/configs/imx8mn_evk.h                       |  198 ++
 include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
 include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
 include/imximage.h                                 |    1 +
 include/linux/compat.h                             |    2 +
 include/power/pmic.h                               |    2 +-
 include/spl.h                                      |    3 +-
 tools/imx8m_image.sh                               |   15 +-
 tools/imx8mimage.c                                 |   31 +-
 79 files changed, 13082 insertions(+), 814 deletions(-)
 create mode 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mm-evk.dts
 create mode 100644 arch/arm/dts/imx8mm-pinfunc.h
 create mode 100644 arch/arm/dts/imx8mm.dtsi
 create mode 100644 arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-ddr4-evk.dts
 create mode 100644 arch/arm/dts/imx8mn-pinfunc.h
 create mode 100644 arch/arm/dts/imx8mn.dtsi
 create mode 100644 arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
 create mode 100644 arch/arm/include/asm/arch-imx8m/clock_imx8mq.h
 create mode 100644 arch/arm/include/asm/arch-imx8m/imx8mm_pins.h
 create mode 100644 arch/arm/include/asm/arch-imx8m/imx8mn_pins.h
 create mode 100644 arch/arm/mach-imx/imx8m/clock_imx8mm.c
 rename arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%)
 create mode 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
 create mode 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg
 create mode 100644 arch/arm/mach-imx/spl_imx_romapi.c
 create mode 100644 board/freescale/imx8mm_evk/Kconfig
 create mode 100644 board/freescale/imx8mm_evk/MAINTAINERS
 create mode 100644 board/freescale/imx8mm_evk/Makefile
 create mode 100644 board/freescale/imx8mm_evk/imx8mm_evk.c
 create mode 100644 board/freescale/imx8mm_evk/lpddr4_timing.c
 create mode 100644 board/freescale/imx8mm_evk/spl.c
 create mode 100644 board/freescale/imx8mn_evk/Kconfig
 create mode 100644 board/freescale/imx8mn_evk/MAINTAINERS
 create mode 100644 board/freescale/imx8mn_evk/Makefile
 create mode 100644 board/freescale/imx8mn_evk/ddr4_timing.c
 create mode 100644 board/freescale/imx8mn_evk/imx8mn_evk.c
 create mode 100644 board/freescale/imx8mn_evk/spl.c
 create mode 100644 configs/imx8mm_evk_defconfig
 create mode 100644 configs/imx8mn_ddr4_evk_defconfig
 create mode 100644 drivers/clk/imx/clk-imx8mm.c
 delete mode 100644 drivers/ddr/imx/imx8m/ddr4_init.c
 create mode 100644 drivers/ddr/imx/imx8m/ddr_init.c
 delete mode 100644 drivers/ddr/imx/imx8m/lpddr4_init.c
 create mode 100644 include/configs/imx8mm_evk.h
 create mode 100644 include/configs/imx8mn_evk.h
 create mode 100644 include/dt-bindings/clock/imx8mm-clock.h
 create mode 100644 include/dt-bindings/clock/imx8mn-clock.h

Comments

Lukasz Majewski July 6, 2019, 10:45 p.m. UTC | #1
Hi Peng,

> From: Peng Fan <peng.fan@nxp.com>
> 
> This patchset is to support i.MX8MM/8MN with some update
> in ddr settings and ddr driver update.
> 
> The initial patchset to support i.MX8MM is
> https://patchwork.ozlabs.org/cover/1093140/
> But in this patchset I dropped CCF, and use original CLK uclass, so
> not use V2 in patchset.

I'm a bit confused here regarding the CCF adoption.

From this patch set I do see that in one place you enable CONFIG_CLK_CCF
and CONFIG_SPL_CLK_CCF and then it is removed in the other patch.
For example the patch 48/52 extends the drivers/clk/imx/clk-imx8mm.c,
which looks like the old approach for the clocking.

Am I correct that the v2 of this patch set will use the CCF v5, which
I've sent some time ago (CCF v4 was used on some i.MX8 SoC though)?

> 
> Bai Ping (1):
>   imx8mq: Update the ddrc QoS setting for B1 chip
> 
> Jacky Bai (2):
>   driver: ddr: Refine the ddr init driver on imx8m
>   ddr: imx8m: Fix the ddr init hang on imx8mq
> 
> Peng Fan (47):
>   linux: compat: guard PAGE_SIZE
>   dm: clk: ignore default settings when node not valid
>   pinctrl: imx: use devfdt_get_addr_size_index
>   i2c: mxc: add CONFIG_CLK support
>   tools: imx8m_image: align spl bin image size
>   ddr: imx8m: fix ddr firmware location when enable SPL OF
>   tools: imx8mimage: fix HDMI/FIT parsing
>   imx8m: add image cfg for i.MX8MM lpddr4
>   imx: add IMX8MQ kconfig entry
>   imx: add IMX8MM kconfig entry
>   imx: imx8mm: add clock bindings header
>   imx: add i.MX8MM cpu type
>   imx: spl: add spl_board_boot_device for i.MX8MM
>   imx8m: update imx-regs for i.MX8MM
>   imx: add get_cpu_rev support for i.MX8MM
>   imx8m: rename clock to clock_imx8mq
>   imx8m: restructure clock.h
>   imx8m: add clk support for i.MX8MM
>   imx8m: soc: probe clk before relocation
>   imx8m: add pin header for i.MX8MM
>   imx: add i.MX8MM PE property
>   imx8m: Fix MMU table issue for OPTEE memory
>   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
>   imx8m: soc: enable SCTR clock before timer init
>   serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
>   clk: imx: add Kconfig entry for i.MX8MM
>   clk: imx: add i.MX8MM clk driver
>   imx: add i.MX8MM EVK board support
>   imx: add i.MX8MN kconfig entry
>   imx8mn: support get_cpu_rev
>   imx8m: add clk support for i.MX8MN
>   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
>   imx: add i.MX8MN PE property
>   imx8mn: add pin header
>   imx: spl: use spl_board_boot_device for i.MX8MN
>   spl: pass args to board_return_to_bootrom
>   imx: add rom api support
>   imx: cpu: restrict get_boot_device
>   imx8mn: add get_boot_device
>   power: pmic: add SPL_DM_PMIC
>   tools: imx8mimage: add ROM VERSION
>   pinctrl: imx8m: support i.MX8MN
>   tools: imx8m_image: support ddr4 firmware
>   clk: imx: add i.MX8MN clk support
>   imx8m: add i.MX8MN ddr4 image cfg file
>   imx: add dtsi for i.MX8MN
>   imx: add i.MX8MN DDR4 board support
> 
> Ye Li (2):
>   imx8m: Configure trustzone region 0 for non-secure access
>   ddr: imx8m: Fix ddr4 driver build issue
> 
>  arch/arm/dts/Makefile                              |    4 +-
>  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92 +
>  arch/arm/dts/imx8mm-evk.dts                        |  235 +++
>  arch/arm/dts/imx8mm-pinfunc.h                      |  629 +++++++
>  arch/arm/dts/imx8mm.dtsi                           |  733 ++++++++
>  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
>  arch/arm/dts/imx8mn-ddr4-evk.dts                   |  221 +++
>  arch/arm/dts/imx8mn-pinfunc.h                      |  646 +++++++
>  arch/arm/dts/imx8mn.dtsi                           |  712 +++++++
>  arch/arm/include/asm/arch-imx/cpu.h                |    7 +
>  arch/arm/include/asm/arch-imx8m/clock.h            |  494 +----
>  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |  465 +++++
>  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424 +++++
>  arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75 +-
>  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |  691 +++++++
>  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763 ++++++++
>  arch/arm/include/asm/mach-imx/iomux-v3.h           |    4 +
>  arch/arm/include/asm/mach-imx/mxc_i2c.h            |    2 +
>  arch/arm/include/asm/mach-imx/sys_proto.h          |   42 +
>  arch/arm/mach-imx/Kconfig                          |    4 +
>  arch/arm/mach-imx/Makefile                         |    2 +
>  arch/arm/mach-imx/cpu.c                            |   16 +-
>  arch/arm/mach-imx/imx8m/Kconfig                    |   28 +-
>  arch/arm/mach-imx/imx8m/Makefile                   |    4 +-
>  arch/arm/mach-imx/imx8m/clock_imx8mm.c             |  707 +++++++
>  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
>  arch/arm/mach-imx/imx8m/clock_slice.c              |  815 ++++++++
>  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |   16 +
>  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |   17 +
>  arch/arm/mach-imx/imx8m/soc.c                      |  162 +-
>  arch/arm/mach-imx/spl.c                            |    8 +
>  arch/arm/mach-imx/spl_imx_romapi.c                 |  292 +++
>  arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5 +-
>  arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5 +-
>  arch/arm/mach-rockchip/rk3399-board-spl.c          |    5 +-
>  arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5 +-
>  board/freescale/imx8mm_evk/Kconfig                 |   12 +
>  board/freescale/imx8mm_evk/MAINTAINERS             |    6 +
>  board/freescale/imx8mm_evk/Makefile                |   12 +
>  board/freescale/imx8mm_evk/imx8mm_evk.c            |   90 +
>  board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> ++++++++++++++++++++
> board/freescale/imx8mm_evk/spl.c                   |  216 +++
> board/freescale/imx8mn_evk/Kconfig                 |   14 +
> board/freescale/imx8mn_evk/MAINTAINERS             |    6 +
> board/freescale/imx8mn_evk/Makefile                |   12 +
> board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
> ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c            |
> 85 + board/freescale/imx8mn_evk/spl.c                   |   91 +
> board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
> common/spl/spl_bootrom.c                           |    7 +-
> configs/imx8mm_evk_defconfig                       |   51 +
> configs/imx8mn_ddr4_evk_defconfig                  |   55 +
> drivers/clk/clk-uclass.c                           |    3 +
> drivers/clk/imx/Kconfig                            |   14 +
> drivers/clk/imx/Makefile                           |    1 +
> drivers/clk/imx/clk-imx8mm.c                       |  121 ++
> drivers/ddr/imx/imx8m/Kconfig                      |    6 +
> drivers/ddr/imx/imx8m/Makefile                     |    4 +-
> drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
> drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
> drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
> drivers/ddr/imx/imx8m/helper.c                     |   22 +-
> drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
> drivers/i2c/mxc_i2c.c                              |   24 +-
> drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
> drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
> drivers/power/pmic/Kconfig                         |   12 +
> drivers/power/pmic/Makefile                        |    2 +-
> drivers/serial/Kconfig                             |    2 +-
> include/configs/imx8mm_evk.h                       |  200 ++
> include/configs/imx8mn_evk.h                       |  198 ++
> include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
> include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
> include/imximage.h                                 |    1 +
> include/linux/compat.h                             |    2 +
> include/power/pmic.h                               |    2 +-
> include/spl.h                                      |    3 +-
> tools/imx8m_image.sh                               |   15 +-
> tools/imx8mimage.c                                 |   31 +- 79 files
> changed, 13082 insertions(+), 814 deletions(-) create mode 100644
> arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
> arch/arm/dts/imx8mm-evk.dts create mode 100644
> arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> arch/arm/dts/imx8mm.dtsi create mode 100644
> arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
> arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> arch/arm/dts/imx8mn.dtsi create mode 100644
> arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode 100644
> arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode 100644
> arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode 100644
> arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode 100644
> arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%) create mode
> 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg create mode
> 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create mode
> 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
> board/freescale/imx8mm_evk/Kconfig create mode 100644
> board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
> board/freescale/imx8mm_evk/Makefile create mode 100644
> board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
> board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
> board/freescale/imx8mm_evk/spl.c create mode 100644
> board/freescale/imx8mn_evk/Kconfig create mode 100644
> board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
> board/freescale/imx8mn_evk/Makefile create mode 100644
> board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
> board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
> board/freescale/imx8mn_evk/spl.c create mode 100644
> configs/imx8mm_evk_defconfig create mode 100644
> configs/imx8mn_ddr4_evk_defconfig create mode 100644
> drivers/clk/imx/clk-imx8mm.c delete mode 100644
> drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> include/configs/imx8mm_evk.h create mode 100644
> include/configs/imx8mn_evk.h create mode 100644
> include/dt-bindings/clock/imx8mm-clock.h create mode 100644
> include/dt-bindings/clock/imx8mn-clock.h
> 

 


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Peng Fan July 8, 2019, 1:28 a.m. UTC | #2
> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> 
> Hi Peng,
> 
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > This patchset is to support i.MX8MM/8MN with some update in ddr
> > settings and ddr driver update.
> >
> > The initial patchset to support i.MX8MM is
> > https://patchwork.ozlabs.org/cover/1093140/
> > But in this patchset I dropped CCF, and use original CLK uclass, so
> > not use V2 in patchset.
> 
> I'm a bit confused here regarding the CCF adoption.
> 
> From this patch set I do see that in one place you enable CONFIG_CLK_CCF
> and CONFIG_SPL_CLK_CCF and then it is removed in the other patch.
> For example the patch 48/52 extends the drivers/clk/imx/clk-imx8mm.c,
> which looks like the old approach for the clocking.

The v2 patchset has cleanup https://github.com/MrVan/u-boot/tree/8m-7-5

> 
> Am I correct that the v2 of this patch set will use the CCF v5, which I've sent
> some time ago (CCF v4 was used on some i.MX8 SoC though)?

No. I tried CCF on i.MX8MM in previous patchset, but I dropped it for now.
We might try to switch to CCF again in future, but we hope i.MX8MM/N
support could land in upstream soon. It has been pending for months.

Regards,
Peng.

> 
> >
> > Bai Ping (1):
> >   imx8mq: Update the ddrc QoS setting for B1 chip
> >
> > Jacky Bai (2):
> >   driver: ddr: Refine the ddr init driver on imx8m
> >   ddr: imx8m: Fix the ddr init hang on imx8mq
> >
> > Peng Fan (47):
> >   linux: compat: guard PAGE_SIZE
> >   dm: clk: ignore default settings when node not valid
> >   pinctrl: imx: use devfdt_get_addr_size_index
> >   i2c: mxc: add CONFIG_CLK support
> >   tools: imx8m_image: align spl bin image size
> >   ddr: imx8m: fix ddr firmware location when enable SPL OF
> >   tools: imx8mimage: fix HDMI/FIT parsing
> >   imx8m: add image cfg for i.MX8MM lpddr4
> >   imx: add IMX8MQ kconfig entry
> >   imx: add IMX8MM kconfig entry
> >   imx: imx8mm: add clock bindings header
> >   imx: add i.MX8MM cpu type
> >   imx: spl: add spl_board_boot_device for i.MX8MM
> >   imx8m: update imx-regs for i.MX8MM
> >   imx: add get_cpu_rev support for i.MX8MM
> >   imx8m: rename clock to clock_imx8mq
> >   imx8m: restructure clock.h
> >   imx8m: add clk support for i.MX8MM
> >   imx8m: soc: probe clk before relocation
> >   imx8m: add pin header for i.MX8MM
> >   imx: add i.MX8MM PE property
> >   imx8m: Fix MMU table issue for OPTEE memory
> >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> >   imx8m: soc: enable SCTR clock before timer init
> >   serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
> >   clk: imx: add Kconfig entry for i.MX8MM
> >   clk: imx: add i.MX8MM clk driver
> >   imx: add i.MX8MM EVK board support
> >   imx: add i.MX8MN kconfig entry
> >   imx8mn: support get_cpu_rev
> >   imx8m: add clk support for i.MX8MN
> >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> >   imx: add i.MX8MN PE property
> >   imx8mn: add pin header
> >   imx: spl: use spl_board_boot_device for i.MX8MN
> >   spl: pass args to board_return_to_bootrom
> >   imx: add rom api support
> >   imx: cpu: restrict get_boot_device
> >   imx8mn: add get_boot_device
> >   power: pmic: add SPL_DM_PMIC
> >   tools: imx8mimage: add ROM VERSION
> >   pinctrl: imx8m: support i.MX8MN
> >   tools: imx8m_image: support ddr4 firmware
> >   clk: imx: add i.MX8MN clk support
> >   imx8m: add i.MX8MN ddr4 image cfg file
> >   imx: add dtsi for i.MX8MN
> >   imx: add i.MX8MN DDR4 board support
> >
> > Ye Li (2):
> >   imx8m: Configure trustzone region 0 for non-secure access
> >   ddr: imx8m: Fix ddr4 driver build issue
> >
> >  arch/arm/dts/Makefile                              |    4 +-
> >  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92 +
> >  arch/arm/dts/imx8mm-evk.dts                        |  235 +++
> >  arch/arm/dts/imx8mm-pinfunc.h                      |  629
> +++++++
> >  arch/arm/dts/imx8mm.dtsi                           |  733
> ++++++++
> >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
> >  arch/arm/dts/imx8mn-ddr4-evk.dts                   |  221 +++
> >  arch/arm/dts/imx8mn-pinfunc.h                      |  646
> +++++++
> >  arch/arm/dts/imx8mn.dtsi                           |  712
> +++++++
> >  arch/arm/include/asm/arch-imx/cpu.h                |    7 +
> >  arch/arm/include/asm/arch-imx8m/clock.h            |  494 +----
> >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |  465
> +++++
> >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424 +++++
> >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75 +-
> >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |  691
> +++++++
> >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763
> ++++++++
> >  arch/arm/include/asm/mach-imx/iomux-v3.h           |    4 +
> >  arch/arm/include/asm/mach-imx/mxc_i2c.h            |    2 +
> >  arch/arm/include/asm/mach-imx/sys_proto.h          |   42 +
> >  arch/arm/mach-imx/Kconfig                          |    4 +
> >  arch/arm/mach-imx/Makefile                         |    2 +
> >  arch/arm/mach-imx/cpu.c                            |   16 +-
> >  arch/arm/mach-imx/imx8m/Kconfig                    |   28 +-
> >  arch/arm/mach-imx/imx8m/Makefile                   |    4 +-
> >  arch/arm/mach-imx/imx8m/clock_imx8mm.c             |  707
> +++++++
> >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
> >  arch/arm/mach-imx/imx8m/clock_slice.c              |  815
> ++++++++
> >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |   16 +
> >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |   17 +
> >  arch/arm/mach-imx/imx8m/soc.c                      |  162 +-
> >  arch/arm/mach-imx/spl.c                            |    8 +
> >  arch/arm/mach-imx/spl_imx_romapi.c                 |  292 +++
> >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5 +-
> >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5 +-
> >  arch/arm/mach-rockchip/rk3399-board-spl.c          |    5 +-
> >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5 +-
> >  board/freescale/imx8mm_evk/Kconfig                 |   12 +
> >  board/freescale/imx8mm_evk/MAINTAINERS             |    6 +
> >  board/freescale/imx8mm_evk/Makefile                |   12 +
> >  board/freescale/imx8mm_evk/imx8mm_evk.c            |   90 +
> >  board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> > ++++++++++++++++++++
> > board/freescale/imx8mm_evk/spl.c                   |  216 +++
> > board/freescale/imx8mn_evk/Kconfig                 |   14 +
> > board/freescale/imx8mn_evk/MAINTAINERS             |    6 +
> > board/freescale/imx8mn_evk/Makefile                |   12 +
> > board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
> > ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c
> |
> > 85 + board/freescale/imx8mn_evk/spl.c                   |   91 +
> > board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
> > common/spl/spl_bootrom.c                           |    7 +-
> > configs/imx8mm_evk_defconfig                       |   51 +
> > configs/imx8mn_ddr4_evk_defconfig                  |   55 +
> > drivers/clk/clk-uclass.c                           |    3 +
> > drivers/clk/imx/Kconfig                            |   14 +
> > drivers/clk/imx/Makefile                           |    1 +
> > drivers/clk/imx/clk-imx8mm.c                       |  121 ++
> > drivers/ddr/imx/imx8m/Kconfig                      |    6 +
> > drivers/ddr/imx/imx8m/Makefile                     |    4 +-
> > drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
> > drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
> > drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
> > drivers/ddr/imx/imx8m/helper.c                     |   22 +-
> > drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
> > drivers/i2c/mxc_i2c.c                              |   24 +-
> > drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
> > drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
> > drivers/power/pmic/Kconfig                         |   12 +
> > drivers/power/pmic/Makefile                        |    2 +-
> > drivers/serial/Kconfig                             |    2 +-
> > include/configs/imx8mm_evk.h                       |  200 ++
> > include/configs/imx8mn_evk.h                       |  198 ++
> > include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
> > include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
> > include/imximage.h                                 |    1 +
> > include/linux/compat.h                             |    2 +
> > include/power/pmic.h                               |    2 +-
> > include/spl.h                                      |    3 +-
> > tools/imx8m_image.sh                               |   15 +-
> > tools/imx8mimage.c                                 |   31 +- 79
> files
> > changed, 13082 insertions(+), 814 deletions(-) create mode 100644
> > arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
> > arch/arm/dts/imx8mm-evk.dts create mode 100644
> > arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> > arch/arm/dts/imx8mm.dtsi create mode 100644
> > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
> > arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> > arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> > arch/arm/dts/imx8mn.dtsi create mode 100644
> > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode 100644
> > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode 100644
> > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode 100644
> > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode 100644
> > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%) create
> mode
> > 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg create
> mode
> > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create mode
> > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
> > board/freescale/imx8mm_evk/Kconfig create mode 100644
> > board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
> > board/freescale/imx8mm_evk/Makefile create mode 100644
> > board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
> > board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
> > board/freescale/imx8mm_evk/spl.c create mode 100644
> > board/freescale/imx8mn_evk/Kconfig create mode 100644
> > board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
> > board/freescale/imx8mn_evk/Makefile create mode 100644
> > board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
> > board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
> > board/freescale/imx8mn_evk/spl.c create mode 100644
> > configs/imx8mm_evk_defconfig create mode 100644
> > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > include/configs/imx8mm_evk.h create mode 100644
> > include/configs/imx8mn_evk.h create mode 100644
> > include/dt-bindings/clock/imx8mm-clock.h create mode 100644
> > include/dt-bindings/clock/imx8mn-clock.h
> >
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de
Lukasz Majewski July 8, 2019, 7:24 a.m. UTC | #3
Hi Peng,

> > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> > 
> > Hi Peng,
> >   
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > This patchset is to support i.MX8MM/8MN with some update in ddr
> > > settings and ddr driver update.
> > >
> > > The initial patchset to support i.MX8MM is
> > > https://patchwork.ozlabs.org/cover/1093140/
> > > But in this patchset I dropped CCF, and use original CLK uclass,
> > > so not use V2 in patchset.  
> > 
> > I'm a bit confused here regarding the CCF adoption.
> > 
> > From this patch set I do see that in one place you enable
> > CONFIG_CLK_CCF and CONFIG_SPL_CLK_CCF and then it is removed in the
> > other patch. For example the patch 48/52 extends the
> > drivers/clk/imx/clk-imx8mm.c, which looks like the old approach for
> > the clocking.  
> 
> The v2 patchset has cleanup
> https://github.com/MrVan/u-boot/tree/8m-7-5
> 
> > 
> > Am I correct that the v2 of this patch set will use the CCF v5,
> > which I've sent some time ago (CCF v4 was used on some i.MX8 SoC
> > though)?  
> 
> No. I tried CCF on i.MX8MM in previous patchset, but I dropped it for
> now. 

If I may ask - why have you dropped it? 

The v5 of CCF has been posted ~2 weeks ago (with you on CC) with a high
chance to be pulled by Stefano after the merge window opens.

When we accept the "legacy" clock approach we will stuck with it for a
long time.

What approach is took by the Linux kernel? CCF or any other one?

> We might try to switch to CCF again in future,

I'm a bit skeptical about such statements. It never works like that -
after it is accepted it would become a "legacy code which we do need
to preserve".

> but we hope
> i.MX8MM/N support could land in upstream soon. It has been pending
> for months.

Was the CCF the reason for the i.MX8 not being pulled for so long? 

> 
> Regards,
> Peng.
> 
> >   
> > >
> > > Bai Ping (1):
> > >   imx8mq: Update the ddrc QoS setting for B1 chip
> > >
> > > Jacky Bai (2):
> > >   driver: ddr: Refine the ddr init driver on imx8m
> > >   ddr: imx8m: Fix the ddr init hang on imx8mq
> > >
> > > Peng Fan (47):
> > >   linux: compat: guard PAGE_SIZE
> > >   dm: clk: ignore default settings when node not valid
> > >   pinctrl: imx: use devfdt_get_addr_size_index
> > >   i2c: mxc: add CONFIG_CLK support
> > >   tools: imx8m_image: align spl bin image size
> > >   ddr: imx8m: fix ddr firmware location when enable SPL OF
> > >   tools: imx8mimage: fix HDMI/FIT parsing
> > >   imx8m: add image cfg for i.MX8MM lpddr4
> > >   imx: add IMX8MQ kconfig entry
> > >   imx: add IMX8MM kconfig entry
> > >   imx: imx8mm: add clock bindings header
> > >   imx: add i.MX8MM cpu type
> > >   imx: spl: add spl_board_boot_device for i.MX8MM
> > >   imx8m: update imx-regs for i.MX8MM
> > >   imx: add get_cpu_rev support for i.MX8MM
> > >   imx8m: rename clock to clock_imx8mq
> > >   imx8m: restructure clock.h
> > >   imx8m: add clk support for i.MX8MM
> > >   imx8m: soc: probe clk before relocation
> > >   imx8m: add pin header for i.MX8MM
> > >   imx: add i.MX8MM PE property
> > >   imx8m: Fix MMU table issue for OPTEE memory
> > >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> > >   imx8m: soc: enable SCTR clock before timer init
> > >   serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
> > >   clk: imx: add Kconfig entry for i.MX8MM
> > >   clk: imx: add i.MX8MM clk driver
> > >   imx: add i.MX8MM EVK board support
> > >   imx: add i.MX8MN kconfig entry
> > >   imx8mn: support get_cpu_rev
> > >   imx8m: add clk support for i.MX8MN
> > >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> > >   imx: add i.MX8MN PE property
> > >   imx8mn: add pin header
> > >   imx: spl: use spl_board_boot_device for i.MX8MN
> > >   spl: pass args to board_return_to_bootrom
> > >   imx: add rom api support
> > >   imx: cpu: restrict get_boot_device
> > >   imx8mn: add get_boot_device
> > >   power: pmic: add SPL_DM_PMIC
> > >   tools: imx8mimage: add ROM VERSION
> > >   pinctrl: imx8m: support i.MX8MN
> > >   tools: imx8m_image: support ddr4 firmware
> > >   clk: imx: add i.MX8MN clk support
> > >   imx8m: add i.MX8MN ddr4 image cfg file
> > >   imx: add dtsi for i.MX8MN
> > >   imx: add i.MX8MN DDR4 board support
> > >
> > > Ye Li (2):
> > >   imx8m: Configure trustzone region 0 for non-secure access
> > >   ddr: imx8m: Fix ddr4 driver build issue
> > >
> > >  arch/arm/dts/Makefile                              |    4 +-
> > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92 +
> > >  arch/arm/dts/imx8mm-evk.dts                        |  235 +++
> > >  arch/arm/dts/imx8mm-pinfunc.h                      |  629  
> > +++++++  
> > >  arch/arm/dts/imx8mm.dtsi                           |  733  
> > ++++++++  
> > >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
> > >  arch/arm/dts/imx8mn-ddr4-evk.dts                   |  221 +++
> > >  arch/arm/dts/imx8mn-pinfunc.h                      |  646  
> > +++++++  
> > >  arch/arm/dts/imx8mn.dtsi                           |  712  
> > +++++++  
> > >  arch/arm/include/asm/arch-imx/cpu.h                |    7 +
> > >  arch/arm/include/asm/arch-imx8m/clock.h            |  494 +----
> > >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |  465  
> > +++++  
> > >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424 +++++
> > >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75 +-
> > >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |  691  
> > +++++++  
> > >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763  
> > ++++++++  
> > >  arch/arm/include/asm/mach-imx/iomux-v3.h           |    4 +
> > >  arch/arm/include/asm/mach-imx/mxc_i2c.h            |    2 +
> > >  arch/arm/include/asm/mach-imx/sys_proto.h          |   42 +
> > >  arch/arm/mach-imx/Kconfig                          |    4 +
> > >  arch/arm/mach-imx/Makefile                         |    2 +
> > >  arch/arm/mach-imx/cpu.c                            |   16 +-
> > >  arch/arm/mach-imx/imx8m/Kconfig                    |   28 +-
> > >  arch/arm/mach-imx/imx8m/Makefile                   |    4 +-
> > >  arch/arm/mach-imx/imx8m/clock_imx8mm.c             |  707  
> > +++++++  
> > >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
> > >  arch/arm/mach-imx/imx8m/clock_slice.c              |  815  
> > ++++++++  
> > >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |   16 +
> > >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |   17 +
> > >  arch/arm/mach-imx/imx8m/soc.c                      |  162 +-
> > >  arch/arm/mach-imx/spl.c                            |    8 +
> > >  arch/arm/mach-imx/spl_imx_romapi.c                 |  292 +++
> > >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5 +-
> > >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5 +-
> > >  arch/arm/mach-rockchip/rk3399-board-spl.c          |    5 +-
> > >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5 +-
> > >  board/freescale/imx8mm_evk/Kconfig                 |   12 +
> > >  board/freescale/imx8mm_evk/MAINTAINERS             |    6 +
> > >  board/freescale/imx8mm_evk/Makefile                |   12 +
> > >  board/freescale/imx8mm_evk/imx8mm_evk.c            |   90 +
> > >  board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> > > ++++++++++++++++++++
> > > board/freescale/imx8mm_evk/spl.c                   |  216 +++
> > > board/freescale/imx8mn_evk/Kconfig                 |   14 +
> > > board/freescale/imx8mn_evk/MAINTAINERS             |    6 +
> > > board/freescale/imx8mn_evk/Makefile                |   12 +
> > > board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
> > > ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c  
> > |  
> > > 85 + board/freescale/imx8mn_evk/spl.c                   |   91 +
> > > board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
> > > common/spl/spl_bootrom.c                           |    7 +-
> > > configs/imx8mm_evk_defconfig                       |   51 +
> > > configs/imx8mn_ddr4_evk_defconfig                  |   55 +
> > > drivers/clk/clk-uclass.c                           |    3 +
> > > drivers/clk/imx/Kconfig                            |   14 +
> > > drivers/clk/imx/Makefile                           |    1 +
> > > drivers/clk/imx/clk-imx8mm.c                       |  121 ++
> > > drivers/ddr/imx/imx8m/Kconfig                      |    6 +
> > > drivers/ddr/imx/imx8m/Makefile                     |    4 +-
> > > drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
> > > drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
> > > drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
> > > drivers/ddr/imx/imx8m/helper.c                     |   22 +-
> > > drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
> > > drivers/i2c/mxc_i2c.c                              |   24 +-
> > > drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
> > > drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
> > > drivers/power/pmic/Kconfig                         |   12 +
> > > drivers/power/pmic/Makefile                        |    2 +-
> > > drivers/serial/Kconfig                             |    2 +-
> > > include/configs/imx8mm_evk.h                       |  200 ++
> > > include/configs/imx8mn_evk.h                       |  198 ++
> > > include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
> > > include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
> > > include/imximage.h                                 |    1 +
> > > include/linux/compat.h                             |    2 +
> > > include/power/pmic.h                               |    2 +-
> > > include/spl.h                                      |    3 +-
> > > tools/imx8m_image.sh                               |   15 +-
> > > tools/imx8mimage.c                                 |   31 +- 79  
> > files  
> > > changed, 13082 insertions(+), 814 deletions(-) create mode 100644
> > > arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
> > > arch/arm/dts/imx8mm-evk.dts create mode 100644
> > > arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> > > arch/arm/dts/imx8mm.dtsi create mode 100644
> > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
> > > arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> > > arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> > > arch/arm/dts/imx8mn.dtsi create mode 100644
> > > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode 100644
> > > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode 100644
> > > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode 100644
> > > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode 100644
> > > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%) create  
> > mode  
> > > 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg create  
> > mode  
> > > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create mode
> > > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
> > > board/freescale/imx8mm_evk/Kconfig create mode 100644
> > > board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
> > > board/freescale/imx8mm_evk/Makefile create mode 100644
> > > board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
> > > board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
> > > board/freescale/imx8mm_evk/spl.c create mode 100644
> > > board/freescale/imx8mn_evk/Kconfig create mode 100644
> > > board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
> > > board/freescale/imx8mn_evk/Makefile create mode 100644
> > > board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
> > > board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
> > > board/freescale/imx8mn_evk/spl.c create mode 100644
> > > configs/imx8mm_evk_defconfig create mode 100644
> > > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > > include/configs/imx8mm_evk.h create mode 100644
> > > include/configs/imx8mn_evk.h create mode 100644
> > > include/dt-bindings/clock/imx8mm-clock.h create mode 100644
> > > include/dt-bindings/clock/imx8mn-clock.h
> > >  
> > 
> > 
> > 
> > 
> > Best regards,
> > 
> > Lukasz Majewski
> > 
> > --
> > 
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > lukma@denx.de  




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Peng Fan July 8, 2019, 7:47 a.m. UTC | #4
Hi Lukasz,

> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> 
> Hi Peng,
> 
> > > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> > >
> > > Hi Peng,
> > >
> > > > From: Peng Fan <peng.fan@nxp.com>
> > > >
> > > > This patchset is to support i.MX8MM/8MN with some update in ddr
> > > > settings and ddr driver update.
> > > >
> > > > The initial patchset to support i.MX8MM is
> > > > https://patchwork.ozlabs.org/cover/1093140/
> > > > But in this patchset I dropped CCF, and use original CLK uclass,
> > > > so not use V2 in patchset.
> > >
> > > I'm a bit confused here regarding the CCF adoption.
> > >
> > > From this patch set I do see that in one place you enable
> > > CONFIG_CLK_CCF and CONFIG_SPL_CLK_CCF and then it is removed in
> the
> > > other patch. For example the patch 48/52 extends the
> > > drivers/clk/imx/clk-imx8mm.c, which looks like the old approach for
> > > the clocking.
> >
> > The v2 patchset has cleanup
> > https://github.com/MrVan/u-boot/tree/8m-7-5
> >
> > >
> > > Am I correct that the v2 of this patch set will use the CCF v5,
> > > which I've sent some time ago (CCF v4 was used on some i.MX8 SoC
> > > though)?
> >
> > No. I tried CCF on i.MX8MM in previous patchset, but I dropped it for
> > now.
> 
> If I may ask - why have you dropped it?

To support i.MX8M, lots of code needs to be added, one is composite.
We also needs clock settings, not just read.

> 
> The v5 of CCF has been posted ~2 weeks ago (with you on CC) with a high
> chance to be pulled by Stefano after the merge window opens.
> 
> When we accept the "legacy" clock approach we will stuck with it for a long
> time.
> 
> What approach is took by the Linux kernel? CCF or any other one?

I am not against CCF. I tried CCF and enabled on i.MX8MM in my last
patchset. But I have to add lots of code based on your version, that
introduces complexity for now.

> 
> > We might try to switch to CCF again in future,
> 
> I'm a bit skeptical about such statements. It never works like that - after it is
> accepted it would become a "legacy code which we do need to preserve".
> 
> > but we hope
> > i.MX8MM/N support could land in upstream soon. It has been pending for
> > months.
> 
> Was the CCF the reason for the i.MX8 not being pulled for so long?

I am not saying so.

The first version to support i.MX8MM is in 2019-01-28. Then I switch
to CCF and posted out new version in 2019-4-30. we have many 3rd
parties want to use mainline U-Boot, not our vendor tree.I hope
i.MX8MM/N could land in the coming merge window, introducing
more to CCF add risk.

Thanks,
Peng.

> 
> >
> > Regards,
> > Peng.
> >
> > >
> > > >
> > > > Bai Ping (1):
> > > >   imx8mq: Update the ddrc QoS setting for B1 chip
> > > >
> > > > Jacky Bai (2):
> > > >   driver: ddr: Refine the ddr init driver on imx8m
> > > >   ddr: imx8m: Fix the ddr init hang on imx8mq
> > > >
> > > > Peng Fan (47):
> > > >   linux: compat: guard PAGE_SIZE
> > > >   dm: clk: ignore default settings when node not valid
> > > >   pinctrl: imx: use devfdt_get_addr_size_index
> > > >   i2c: mxc: add CONFIG_CLK support
> > > >   tools: imx8m_image: align spl bin image size
> > > >   ddr: imx8m: fix ddr firmware location when enable SPL OF
> > > >   tools: imx8mimage: fix HDMI/FIT parsing
> > > >   imx8m: add image cfg for i.MX8MM lpddr4
> > > >   imx: add IMX8MQ kconfig entry
> > > >   imx: add IMX8MM kconfig entry
> > > >   imx: imx8mm: add clock bindings header
> > > >   imx: add i.MX8MM cpu type
> > > >   imx: spl: add spl_board_boot_device for i.MX8MM
> > > >   imx8m: update imx-regs for i.MX8MM
> > > >   imx: add get_cpu_rev support for i.MX8MM
> > > >   imx8m: rename clock to clock_imx8mq
> > > >   imx8m: restructure clock.h
> > > >   imx8m: add clk support for i.MX8MM
> > > >   imx8m: soc: probe clk before relocation
> > > >   imx8m: add pin header for i.MX8MM
> > > >   imx: add i.MX8MM PE property
> > > >   imx8m: Fix MMU table issue for OPTEE memory
> > > >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> > > >   imx8m: soc: enable SCTR clock before timer init
> > > >   serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
> > > >   clk: imx: add Kconfig entry for i.MX8MM
> > > >   clk: imx: add i.MX8MM clk driver
> > > >   imx: add i.MX8MM EVK board support
> > > >   imx: add i.MX8MN kconfig entry
> > > >   imx8mn: support get_cpu_rev
> > > >   imx8m: add clk support for i.MX8MN
> > > >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> > > >   imx: add i.MX8MN PE property
> > > >   imx8mn: add pin header
> > > >   imx: spl: use spl_board_boot_device for i.MX8MN
> > > >   spl: pass args to board_return_to_bootrom
> > > >   imx: add rom api support
> > > >   imx: cpu: restrict get_boot_device
> > > >   imx8mn: add get_boot_device
> > > >   power: pmic: add SPL_DM_PMIC
> > > >   tools: imx8mimage: add ROM VERSION
> > > >   pinctrl: imx8m: support i.MX8MN
> > > >   tools: imx8m_image: support ddr4 firmware
> > > >   clk: imx: add i.MX8MN clk support
> > > >   imx8m: add i.MX8MN ddr4 image cfg file
> > > >   imx: add dtsi for i.MX8MN
> > > >   imx: add i.MX8MN DDR4 board support
> > > >
> > > > Ye Li (2):
> > > >   imx8m: Configure trustzone region 0 for non-secure access
> > > >   ddr: imx8m: Fix ddr4 driver build issue
> > > >
> > > >  arch/arm/dts/Makefile                              |    4
> +-
> > > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92 +
> > > >  arch/arm/dts/imx8mm-evk.dts                        |  235
> +++
> > > >  arch/arm/dts/imx8mm-pinfunc.h                      |  629
> > > +++++++
> > > >  arch/arm/dts/imx8mm.dtsi                           |  733
> > > ++++++++
> > > >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
> > > >  arch/arm/dts/imx8mn-ddr4-evk.dts                   |  221
> +++
> > > >  arch/arm/dts/imx8mn-pinfunc.h                      |  646
> > > +++++++
> > > >  arch/arm/dts/imx8mn.dtsi                           |  712
> > > +++++++
> > > >  arch/arm/include/asm/arch-imx/cpu.h                |    7 +
> > > >  arch/arm/include/asm/arch-imx8m/clock.h            |  494
> +----
> > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |  465
> > > +++++
> > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424
> +++++
> > > >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75 +-
> > > >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |  691
> > > +++++++
> > > >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763
> > > ++++++++
> > > >  arch/arm/include/asm/mach-imx/iomux-v3.h           |    4 +
> > > >  arch/arm/include/asm/mach-imx/mxc_i2c.h            |    2 +
> > > >  arch/arm/include/asm/mach-imx/sys_proto.h          |   42 +
> > > >  arch/arm/mach-imx/Kconfig                          |    4 +
> > > >  arch/arm/mach-imx/Makefile                         |    2 +
> > > >  arch/arm/mach-imx/cpu.c                            |   16
> +-
> > > >  arch/arm/mach-imx/imx8m/Kconfig                    |   28
> +-
> > > >  arch/arm/mach-imx/imx8m/Makefile                   |    4
> +-
> > > >  arch/arm/mach-imx/imx8m/clock_imx8mm.c             |  707
> > > +++++++
> > > >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
> > > >  arch/arm/mach-imx/imx8m/clock_slice.c              |  815
> > > ++++++++
> > > >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |   16 +
> > > >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |   17 +
> > > >  arch/arm/mach-imx/imx8m/soc.c                      |  162
> +-
> > > >  arch/arm/mach-imx/spl.c                            |    8 +
> > > >  arch/arm/mach-imx/spl_imx_romapi.c                 |  292
> +++
> > > >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5 +-
> > > >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5 +-
> > > >  arch/arm/mach-rockchip/rk3399-board-spl.c          |    5 +-
> > > >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5 +-
> > > >  board/freescale/imx8mm_evk/Kconfig                 |   12 +
> > > >  board/freescale/imx8mm_evk/MAINTAINERS             |    6
> +
> > > >  board/freescale/imx8mm_evk/Makefile                |   12 +
> > > >  board/freescale/imx8mm_evk/imx8mm_evk.c            |   90
> +
> > > >  board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> > > > ++++++++++++++++++++
> > > > board/freescale/imx8mm_evk/spl.c                   |  216 +++
> > > > board/freescale/imx8mn_evk/Kconfig                 |   14 +
> > > > board/freescale/imx8mn_evk/MAINTAINERS             |    6 +
> > > > board/freescale/imx8mn_evk/Makefile                |   12 +
> > > > board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
> > > > ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c
> > > |
> > > > 85 + board/freescale/imx8mn_evk/spl.c                   |   91
> +
> > > > board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
> > > > common/spl/spl_bootrom.c                           |    7 +-
> > > > configs/imx8mm_evk_defconfig                       |   51 +
> > > > configs/imx8mn_ddr4_evk_defconfig                  |   55 +
> > > > drivers/clk/clk-uclass.c                           |    3 +
> > > > drivers/clk/imx/Kconfig                            |   14 +
> > > > drivers/clk/imx/Makefile                           |    1 +
> > > > drivers/clk/imx/clk-imx8mm.c                       |  121 ++
> > > > drivers/ddr/imx/imx8m/Kconfig                      |    6 +
> > > > drivers/ddr/imx/imx8m/Makefile                     |    4 +-
> > > > drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
> > > > drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
> > > > drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
> > > > drivers/ddr/imx/imx8m/helper.c                     |   22 +-
> > > > drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
> > > > drivers/i2c/mxc_i2c.c                              |   24 +-
> > > > drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
> > > > drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
> > > > drivers/power/pmic/Kconfig                         |   12 +
> > > > drivers/power/pmic/Makefile                        |    2 +-
> > > > drivers/serial/Kconfig                             |    2 +-
> > > > include/configs/imx8mm_evk.h                       |  200 ++
> > > > include/configs/imx8mn_evk.h                       |  198 ++
> > > > include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
> > > > include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
> > > > include/imximage.h                                 |    1 +
> > > > include/linux/compat.h                             |    2 +
> > > > include/power/pmic.h                               |    2 +-
> > > > include/spl.h                                      |    3 +-
> > > > tools/imx8m_image.sh                               |   15 +-
> > > > tools/imx8mimage.c                                 |   31 +-
> 79
> > > files
> > > > changed, 13082 insertions(+), 814 deletions(-) create mode 100644
> > > > arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
> > > > arch/arm/dts/imx8mm-evk.dts create mode 100644
> > > > arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> > > > arch/arm/dts/imx8mm.dtsi create mode 100644
> > > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
> > > > arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> > > > arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> > > > arch/arm/dts/imx8mn.dtsi create mode 100644
> > > > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode
> 100644
> > > > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode
> 100644
> > > > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode
> 100644
> > > > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode
> 100644
> > > > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > > > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%) create
> > > mode
> > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg create
> > > mode
> > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create
> mode
> > > > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
> > > > board/freescale/imx8mm_evk/Kconfig create mode 100644
> > > > board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
> > > > board/freescale/imx8mm_evk/Makefile create mode 100644
> > > > board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
> > > > board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
> > > > board/freescale/imx8mm_evk/spl.c create mode 100644
> > > > board/freescale/imx8mn_evk/Kconfig create mode 100644
> > > > board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
> > > > board/freescale/imx8mn_evk/Makefile create mode 100644
> > > > board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
> > > > board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
> > > > board/freescale/imx8mn_evk/spl.c create mode 100644
> > > > configs/imx8mm_evk_defconfig create mode 100644
> > > > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > > > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > > > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > > > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > > > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > > > include/configs/imx8mm_evk.h create mode 100644
> > > > include/configs/imx8mn_evk.h create mode 100644
> > > > include/dt-bindings/clock/imx8mm-clock.h create mode 100644
> > > > include/dt-bindings/clock/imx8mn-clock.h
> > > >
> > >
> > >
> > >
> > >
> > > Best regards,
> > >
> > > Lukasz Majewski
> > >
> > > --
> > >
> > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > > lukma@denx.de
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de
Lukasz Majewski July 8, 2019, 8:15 a.m. UTC | #5
Hi Peng,

> Hi Lukasz,
> 
> > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> > 
> > Hi Peng,
> >   
> > > > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> > > >
> > > > Hi Peng,
> > > >  
> > > > > From: Peng Fan <peng.fan@nxp.com>
> > > > >
> > > > > This patchset is to support i.MX8MM/8MN with some update in
> > > > > ddr settings and ddr driver update.
> > > > >
> > > > > The initial patchset to support i.MX8MM is
> > > > > https://patchwork.ozlabs.org/cover/1093140/
> > > > > But in this patchset I dropped CCF, and use original CLK
> > > > > uclass, so not use V2 in patchset.  
> > > >
> > > > I'm a bit confused here regarding the CCF adoption.
> > > >
> > > > From this patch set I do see that in one place you enable
> > > > CONFIG_CLK_CCF and CONFIG_SPL_CLK_CCF and then it is removed
> > > > in  
> > the  
> > > > other patch. For example the patch 48/52 extends the
> > > > drivers/clk/imx/clk-imx8mm.c, which looks like the old approach
> > > > for the clocking.  
> > >
> > > The v2 patchset has cleanup
> > > https://github.com/MrVan/u-boot/tree/8m-7-5
> > >  
> > > >
> > > > Am I correct that the v2 of this patch set will use the CCF v5,
> > > > which I've sent some time ago (CCF v4 was used on some i.MX8 SoC
> > > > though)?  
> > >
> > > No. I tried CCF on i.MX8MM in previous patchset, but I dropped it
> > > for now.  
> > 
> > If I may ask - why have you dropped it?  
> 
> To support i.MX8M, lots of code needs to be added, one is composite.

Is it better to add a hand made composite clock code instead of
aligning it to Linux mainline just from the outset?

> We also needs clock settings, not just read.

Is the code for "setting clocks" already upstreamed somewhere (e.g.
Linux) or is it only introduced for U-Boot?

> 
> > 
> > The v5 of CCF has been posted ~2 weeks ago (with you on CC) with a
> > high chance to be pulled by Stefano after the merge window opens.
> > 
> > When we accept the "legacy" clock approach we will stuck with it
> > for a long time.
> > 
> > What approach is took by the Linux kernel? CCF or any other one?  
> 
> I am not against CCF. I tried CCF and enabled on i.MX8MM in my last
> patchset. But I have to add lots of code based on your version, that
> introduces complexity for now.

You will have to add this complexity anyway after people start
demanding new clocks for IPs which they need to enable.

Moreover, the CCF v5 was posted 2 weeks ago - wasn't it enough time for
applying your patches from v4?

> 
> >   
> > > We might try to switch to CCF again in future,  
> > 
> > I'm a bit skeptical about such statements. It never works like that
> > - after it is accepted it would become a "legacy code which we do
> > need to preserve". 
> > > but we hope
> > > i.MX8MM/N support could land in upstream soon. It has been
> > > pending for months.  
> > 
> > Was the CCF the reason for the i.MX8 not being pulled for so long?  
> 
> I am not saying so.
> 
> The first version to support i.MX8MM is in 2019-01-28. Then I switch
> to CCF and posted out new version in 2019-4-30.

Maybe the version posted in 2019-01-28 was just not ready for being
pulled?

It happens that the community wants to avoid problems encountered
earlier with other SoCs (like i.MX6, i.MX7), so the discussion takes
time.

(The similar situation is with other projects too - how many release
cycles it takes to add new SoC in Linux? Or new port to glibc?).

> we have many 3rd parties want to use mainline U-Boot, 
> not our vendor tree.

There must be a reason that they want the U-Boot mainline. IMHO the
main reason for it is that people not only from a single company want
to add the code, so they need to discuss (and get the agreement) to
avoid stepping in each other's toes.

And the discussion/tests takes time ...

> I hope
> i.MX8MM/N could land in the coming merge window,

This depends solely on the code quality I think. 

> introducing more to CCF add risk.

Risk for not being accepted?

I do see however other risk - the i.MX8 will gain one-off clock support
code instead of adopting the CCF just from the outset.


> 
> Thanks,
> Peng.
> 
> >   
> > >
> > > Regards,
> > > Peng.
> > >  
> > > >  
> > > > >
> > > > > Bai Ping (1):
> > > > >   imx8mq: Update the ddrc QoS setting for B1 chip
> > > > >
> > > > > Jacky Bai (2):
> > > > >   driver: ddr: Refine the ddr init driver on imx8m
> > > > >   ddr: imx8m: Fix the ddr init hang on imx8mq
> > > > >
> > > > > Peng Fan (47):
> > > > >   linux: compat: guard PAGE_SIZE
> > > > >   dm: clk: ignore default settings when node not valid
> > > > >   pinctrl: imx: use devfdt_get_addr_size_index
> > > > >   i2c: mxc: add CONFIG_CLK support
> > > > >   tools: imx8m_image: align spl bin image size
> > > > >   ddr: imx8m: fix ddr firmware location when enable SPL OF
> > > > >   tools: imx8mimage: fix HDMI/FIT parsing
> > > > >   imx8m: add image cfg for i.MX8MM lpddr4
> > > > >   imx: add IMX8MQ kconfig entry
> > > > >   imx: add IMX8MM kconfig entry
> > > > >   imx: imx8mm: add clock bindings header
> > > > >   imx: add i.MX8MM cpu type
> > > > >   imx: spl: add spl_board_boot_device for i.MX8MM
> > > > >   imx8m: update imx-regs for i.MX8MM
> > > > >   imx: add get_cpu_rev support for i.MX8MM
> > > > >   imx8m: rename clock to clock_imx8mq
> > > > >   imx8m: restructure clock.h
> > > > >   imx8m: add clk support for i.MX8MM
> > > > >   imx8m: soc: probe clk before relocation
> > > > >   imx8m: add pin header for i.MX8MM
> > > > >   imx: add i.MX8MM PE property
> > > > >   imx8m: Fix MMU table issue for OPTEE memory
> > > > >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> > > > >   imx8m: soc: enable SCTR clock before timer init
> > > > >   serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
> > > > >   clk: imx: add Kconfig entry for i.MX8MM
> > > > >   clk: imx: add i.MX8MM clk driver
> > > > >   imx: add i.MX8MM EVK board support
> > > > >   imx: add i.MX8MN kconfig entry
> > > > >   imx8mn: support get_cpu_rev
> > > > >   imx8m: add clk support for i.MX8MN
> > > > >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> > > > >   imx: add i.MX8MN PE property
> > > > >   imx8mn: add pin header
> > > > >   imx: spl: use spl_board_boot_device for i.MX8MN
> > > > >   spl: pass args to board_return_to_bootrom
> > > > >   imx: add rom api support
> > > > >   imx: cpu: restrict get_boot_device
> > > > >   imx8mn: add get_boot_device
> > > > >   power: pmic: add SPL_DM_PMIC
> > > > >   tools: imx8mimage: add ROM VERSION
> > > > >   pinctrl: imx8m: support i.MX8MN
> > > > >   tools: imx8m_image: support ddr4 firmware
> > > > >   clk: imx: add i.MX8MN clk support
> > > > >   imx8m: add i.MX8MN ddr4 image cfg file
> > > > >   imx: add dtsi for i.MX8MN
> > > > >   imx: add i.MX8MN DDR4 board support
> > > > >
> > > > > Ye Li (2):
> > > > >   imx8m: Configure trustzone region 0 for non-secure access
> > > > >   ddr: imx8m: Fix ddr4 driver build issue
> > > > >
> > > > >  arch/arm/dts/Makefile                              |    4  
> > +-  
> > > > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92 +
> > > > >  arch/arm/dts/imx8mm-evk.dts                        |  235  
> > +++  
> > > > >  arch/arm/dts/imx8mm-pinfunc.h                      |  629  
> > > > +++++++  
> > > > >  arch/arm/dts/imx8mm.dtsi                           |  733  
> > > > ++++++++  
> > > > >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
> > > > >  arch/arm/dts/imx8mn-ddr4-evk.dts                   |  221  
> > +++  
> > > > >  arch/arm/dts/imx8mn-pinfunc.h                      |  646  
> > > > +++++++  
> > > > >  arch/arm/dts/imx8mn.dtsi                           |  712  
> > > > +++++++  
> > > > >  arch/arm/include/asm/arch-imx/cpu.h                |    7 +
> > > > >  arch/arm/include/asm/arch-imx8m/clock.h            |  494  
> > +----  
> > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |  465  
> > > > +++++  
> > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424  
> > +++++  
> > > > >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75 +-
> > > > >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |  691  
> > > > +++++++  
> > > > >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763  
> > > > ++++++++  
> > > > >  arch/arm/include/asm/mach-imx/iomux-v3.h           |    4 +
> > > > >  arch/arm/include/asm/mach-imx/mxc_i2c.h            |    2 +
> > > > >  arch/arm/include/asm/mach-imx/sys_proto.h          |   42 +
> > > > >  arch/arm/mach-imx/Kconfig                          |    4 +
> > > > >  arch/arm/mach-imx/Makefile                         |    2 +
> > > > >  arch/arm/mach-imx/cpu.c                            |   16  
> > +-  
> > > > >  arch/arm/mach-imx/imx8m/Kconfig                    |   28  
> > +-  
> > > > >  arch/arm/mach-imx/imx8m/Makefile                   |    4  
> > +-  
> > > > >  arch/arm/mach-imx/imx8m/clock_imx8mm.c             |  707  
> > > > +++++++  
> > > > >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
> > > > >  arch/arm/mach-imx/imx8m/clock_slice.c              |  815  
> > > > ++++++++  
> > > > >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |   16 +
> > > > >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |   17 +
> > > > >  arch/arm/mach-imx/imx8m/soc.c                      |  162  
> > +-  
> > > > >  arch/arm/mach-imx/spl.c                            |    8 +
> > > > >  arch/arm/mach-imx/spl_imx_romapi.c                 |  292  
> > +++  
> > > > >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5 +-
> > > > >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5 +-
> > > > >  arch/arm/mach-rockchip/rk3399-board-spl.c          |    5 +-
> > > > >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5 +-
> > > > >  board/freescale/imx8mm_evk/Kconfig                 |   12 +
> > > > >  board/freescale/imx8mm_evk/MAINTAINERS             |    6  
> > +  
> > > > >  board/freescale/imx8mm_evk/Makefile                |   12 +
> > > > >  board/freescale/imx8mm_evk/imx8mm_evk.c            |   90  
> > +  
> > > > >  board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> > > > > ++++++++++++++++++++
> > > > > board/freescale/imx8mm_evk/spl.c                   |  216 +++
> > > > > board/freescale/imx8mn_evk/Kconfig                 |   14 +
> > > > > board/freescale/imx8mn_evk/MAINTAINERS             |    6 +
> > > > > board/freescale/imx8mn_evk/Makefile                |   12 +
> > > > > board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
> > > > > ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c  
> > > > |  
> > > > > 85 + board/freescale/imx8mn_evk/spl.c                   |
> > > > > 91  
> > +  
> > > > > board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
> > > > > common/spl/spl_bootrom.c                           |    7 +-
> > > > > configs/imx8mm_evk_defconfig                       |   51 +
> > > > > configs/imx8mn_ddr4_evk_defconfig                  |   55 +
> > > > > drivers/clk/clk-uclass.c                           |    3 +
> > > > > drivers/clk/imx/Kconfig                            |   14 +
> > > > > drivers/clk/imx/Makefile                           |    1 +
> > > > > drivers/clk/imx/clk-imx8mm.c                       |  121 ++
> > > > > drivers/ddr/imx/imx8m/Kconfig                      |    6 +
> > > > > drivers/ddr/imx/imx8m/Makefile                     |    4 +-
> > > > > drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
> > > > > drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
> > > > > drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
> > > > > drivers/ddr/imx/imx8m/helper.c                     |   22 +-
> > > > > drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
> > > > > drivers/i2c/mxc_i2c.c                              |   24 +-
> > > > > drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
> > > > > drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
> > > > > drivers/power/pmic/Kconfig                         |   12 +
> > > > > drivers/power/pmic/Makefile                        |    2 +-
> > > > > drivers/serial/Kconfig                             |    2 +-
> > > > > include/configs/imx8mm_evk.h                       |  200 ++
> > > > > include/configs/imx8mn_evk.h                       |  198 ++
> > > > > include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
> > > > > include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
> > > > > include/imximage.h                                 |    1 +
> > > > > include/linux/compat.h                             |    2 +
> > > > > include/power/pmic.h                               |    2 +-
> > > > > include/spl.h                                      |    3 +-
> > > > > tools/imx8m_image.sh                               |   15 +-
> > > > > tools/imx8mimage.c                                 |   31 +-  
> > 79  
> > > > files  
> > > > > changed, 13082 insertions(+), 814 deletions(-) create mode
> > > > > 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
> > > > > arch/arm/dts/imx8mm-evk.dts create mode 100644
> > > > > arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> > > > > arch/arm/dts/imx8mm.dtsi create mode 100644
> > > > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
> > > > > arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> > > > > arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> > > > > arch/arm/dts/imx8mn.dtsi create mode 100644
> > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode  
> > 100644  
> > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode  
> > 100644  
> > > > > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode  
> > 100644  
> > > > > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode  
> > 100644  
> > > > > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > > > > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%)
> > > > > create  
> > > > mode  
> > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > create  
> > > > mode  
> > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create  
> > mode  
> > > > > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
> > > > > board/freescale/imx8mm_evk/Kconfig create mode 100644
> > > > > board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
> > > > > board/freescale/imx8mm_evk/Makefile create mode 100644
> > > > > board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
> > > > > board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
> > > > > board/freescale/imx8mm_evk/spl.c create mode 100644
> > > > > board/freescale/imx8mn_evk/Kconfig create mode 100644
> > > > > board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
> > > > > board/freescale/imx8mn_evk/Makefile create mode 100644
> > > > > board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
> > > > > board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
> > > > > board/freescale/imx8mn_evk/spl.c create mode 100644
> > > > > configs/imx8mm_evk_defconfig create mode 100644
> > > > > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > > > > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > > > > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > > > > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > > > > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > > > > include/configs/imx8mm_evk.h create mode 100644
> > > > > include/configs/imx8mn_evk.h create mode 100644
> > > > > include/dt-bindings/clock/imx8mm-clock.h create mode 100644
> > > > > include/dt-bindings/clock/imx8mn-clock.h
> > > > >  
> > > >
> > > >
> > > >
> > > >
> > > > Best regards,
> > > >
> > > > Lukasz Majewski
> > > >
> > > > --
> > > >
> > > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > (+49)-8142-66989-80 Email: lukma@denx.de  
> > 
> > 
> > 
> > 
> > Best regards,
> > 
> > Lukasz Majewski
> > 
> > --
> > 
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > lukma@denx.de  




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Peng Fan July 8, 2019, 8:37 a.m. UTC | #6
> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> 
> Hi Peng,
> 
> > Hi Lukasz,
> >
> > > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> > >
> > > Hi Peng,
> > >
> > > > > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> > > > >
> > > > > Hi Peng,
> > > > >
> > > > > > From: Peng Fan <peng.fan@nxp.com>
> > > > > >
> > > > > > This patchset is to support i.MX8MM/8MN with some update in
> > > > > > ddr settings and ddr driver update.
> > > > > >
> > > > > > The initial patchset to support i.MX8MM is
> > > > > > https://patchwork.ozlabs.org/cover/1093140/
> > > > > > But in this patchset I dropped CCF, and use original CLK
> > > > > > uclass, so not use V2 in patchset.
> > > > >
> > > > > I'm a bit confused here regarding the CCF adoption.
> > > > >
> > > > > From this patch set I do see that in one place you enable
> > > > > CONFIG_CLK_CCF and CONFIG_SPL_CLK_CCF and then it is removed
> in
> > > the
> > > > > other patch. For example the patch 48/52 extends the
> > > > > drivers/clk/imx/clk-imx8mm.c, which looks like the old approach
> > > > > for the clocking.
> > > >
> > > > The v2 patchset has cleanup
> > > > https://github.com/MrVan/u-boot/tree/8m-7-5
> > > >
> > > > >
> > > > > Am I correct that the v2 of this patch set will use the CCF v5,
> > > > > which I've sent some time ago (CCF v4 was used on some i.MX8 SoC
> > > > > though)?
> > > >
> > > > No. I tried CCF on i.MX8MM in previous patchset, but I dropped it
> > > > for now.
> > >
> > > If I may ask - why have you dropped it?
> >
> > To support i.MX8M, lots of code needs to be added, one is composite.
> 
> Is it better to add a hand made composite clock code instead of aligning it to
> Linux mainline just from the outset?
> 
> > We also needs clock settings, not just read.
> 
> Is the code for "setting clocks" already upstreamed somewhere (e.g.
> Linux) or is it only introduced for U-Boot?

In my last version, I added set gate, set divider, mux reparent, composite
based on CCF. That's quite much code.

> 
> >
> > >
> > > The v5 of CCF has been posted ~2 weeks ago (with you on CC) with a
> > > high chance to be pulled by Stefano after the merge window opens.
> > >
> > > When we accept the "legacy" clock approach we will stuck with it for
> > > a long time.
> > >
> > > What approach is took by the Linux kernel? CCF or any other one?
> >
> > I am not against CCF. I tried CCF and enabled on i.MX8MM in my last
> > patchset. But I have to add lots of code based on your version, that
> > introduces complexity for now.
> 
> You will have to add this complexity anyway after people start demanding
> new clocks for IPs which they need to enable.
> 
> Moreover, the CCF v5 was posted 2 weeks ago - wasn't it enough time for
> applying your patches from v4?
> 
> >
> > >
> > > > We might try to switch to CCF again in future,
> > >
> > > I'm a bit skeptical about such statements. It never works like that
> > > - after it is accepted it would become a "legacy code which we do
> > > need to preserve".
> > > > but we hope
> > > > i.MX8MM/N support could land in upstream soon. It has been pending
> > > > for months.
> > >
> > > Was the CCF the reason for the i.MX8 not being pulled for so long?
> >
> > I am not saying so.
> >
> > The first version to support i.MX8MM is in 2019-01-28. Then I switch
> > to CCF and posted out new version in 2019-4-30.
> 
> Maybe the version posted in 2019-01-28 was just not ready for being pulled?

In this v1 patchset, you mentioned CCF, so I start/wait/test CCF patchset.
But CCF v5 was out two weeks ago, almost half a year.

When it become mature, we could reconsider CCF on i.MX8M.

> 
> It happens that the community wants to avoid problems encountered earlier
> with other SoCs (like i.MX6, i.MX7), so the discussion takes time.
> 
> (The similar situation is with other projects too - how many release cycles it
> takes to add new SoC in Linux? Or new port to glibc?).

At least we could have a next tree to accept patches.

> 
> > we have many 3rd parties want to use mainline U-Boot, not our vendor
> > tree.
> 
> There must be a reason that they want the U-Boot mainline. IMHO the main
> reason for it is that people not only from a single company want to add the
> code, so they need to discuss (and get the agreement) to avoid stepping in
> each other's toes.
> 
> And the discussion/tests takes time ... 
> > I hope
> > i.MX8MM/N could land in the coming merge window,
> 
> This depends solely on the code quality I think.
> 
> > introducing more to CCF add risk.
> 
> Risk for not being accepted?
> 
> I do see however other risk - the i.MX8 will gain one-off clock support code
> instead of adopting the CCF just from the outset.
> 

i.MX8 no need CCF. SCFW handles the complexity of Clock.

Regards,
Peng.

> 
> >
> > Thanks,
> > Peng.
> >
> > >
> > > >
> > > > Regards,
> > > > Peng.
> > > >
> > > > >
> > > > > >
> > > > > > Bai Ping (1):
> > > > > >   imx8mq: Update the ddrc QoS setting for B1 chip
> > > > > >
> > > > > > Jacky Bai (2):
> > > > > >   driver: ddr: Refine the ddr init driver on imx8m
> > > > > >   ddr: imx8m: Fix the ddr init hang on imx8mq
> > > > > >
> > > > > > Peng Fan (47):
> > > > > >   linux: compat: guard PAGE_SIZE
> > > > > >   dm: clk: ignore default settings when node not valid
> > > > > >   pinctrl: imx: use devfdt_get_addr_size_index
> > > > > >   i2c: mxc: add CONFIG_CLK support
> > > > > >   tools: imx8m_image: align spl bin image size
> > > > > >   ddr: imx8m: fix ddr firmware location when enable SPL OF
> > > > > >   tools: imx8mimage: fix HDMI/FIT parsing
> > > > > >   imx8m: add image cfg for i.MX8MM lpddr4
> > > > > >   imx: add IMX8MQ kconfig entry
> > > > > >   imx: add IMX8MM kconfig entry
> > > > > >   imx: imx8mm: add clock bindings header
> > > > > >   imx: add i.MX8MM cpu type
> > > > > >   imx: spl: add spl_board_boot_device for i.MX8MM
> > > > > >   imx8m: update imx-regs for i.MX8MM
> > > > > >   imx: add get_cpu_rev support for i.MX8MM
> > > > > >   imx8m: rename clock to clock_imx8mq
> > > > > >   imx8m: restructure clock.h
> > > > > >   imx8m: add clk support for i.MX8MM
> > > > > >   imx8m: soc: probe clk before relocation
> > > > > >   imx8m: add pin header for i.MX8MM
> > > > > >   imx: add i.MX8MM PE property
> > > > > >   imx8m: Fix MMU table issue for OPTEE memory
> > > > > >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > >   imx8m: soc: enable SCTR clock before timer init
> > > > > >   serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
> > > > > >   clk: imx: add Kconfig entry for i.MX8MM
> > > > > >   clk: imx: add i.MX8MM clk driver
> > > > > >   imx: add i.MX8MM EVK board support
> > > > > >   imx: add i.MX8MN kconfig entry
> > > > > >   imx8mn: support get_cpu_rev
> > > > > >   imx8m: add clk support for i.MX8MN
> > > > > >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > >   imx: add i.MX8MN PE property
> > > > > >   imx8mn: add pin header
> > > > > >   imx: spl: use spl_board_boot_device for i.MX8MN
> > > > > >   spl: pass args to board_return_to_bootrom
> > > > > >   imx: add rom api support
> > > > > >   imx: cpu: restrict get_boot_device
> > > > > >   imx8mn: add get_boot_device
> > > > > >   power: pmic: add SPL_DM_PMIC
> > > > > >   tools: imx8mimage: add ROM VERSION
> > > > > >   pinctrl: imx8m: support i.MX8MN
> > > > > >   tools: imx8m_image: support ddr4 firmware
> > > > > >   clk: imx: add i.MX8MN clk support
> > > > > >   imx8m: add i.MX8MN ddr4 image cfg file
> > > > > >   imx: add dtsi for i.MX8MN
> > > > > >   imx: add i.MX8MN DDR4 board support
> > > > > >
> > > > > > Ye Li (2):
> > > > > >   imx8m: Configure trustzone region 0 for non-secure access
> > > > > >   ddr: imx8m: Fix ddr4 driver build issue
> > > > > >
> > > > > >  arch/arm/dts/Makefile                              |
> 4
> > > +-
> > > > > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92
> +
> > > > > >  arch/arm/dts/imx8mm-evk.dts                        |
> 235
> > > +++
> > > > > >  arch/arm/dts/imx8mm-pinfunc.h                      |
> 629
> > > > > +++++++
> > > > > >  arch/arm/dts/imx8mm.dtsi                           |
> 733
> > > > > ++++++++
> > > > > >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
> > > > > >  arch/arm/dts/imx8mn-ddr4-evk.dts                   |
> 221
> > > +++
> > > > > >  arch/arm/dts/imx8mn-pinfunc.h                      |
> 646
> > > > > +++++++
> > > > > >  arch/arm/dts/imx8mn.dtsi                           |
> 712
> > > > > +++++++
> > > > > >  arch/arm/include/asm/arch-imx/cpu.h                |    7
> +
> > > > > >  arch/arm/include/asm/arch-imx8m/clock.h            |  494
> > > +----
> > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |
> 465
> > > > > +++++
> > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424
> > > +++++
> > > > > >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75
> +-
> > > > > >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |
> 691
> > > > > +++++++
> > > > > >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763
> > > > > ++++++++
> > > > > >  arch/arm/include/asm/mach-imx/iomux-v3.h           |
> 4 +
> > > > > >  arch/arm/include/asm/mach-imx/mxc_i2c.h            |
> 2 +
> > > > > >  arch/arm/include/asm/mach-imx/sys_proto.h          |   42
> +
> > > > > >  arch/arm/mach-imx/Kconfig                          |
> 4 +
> > > > > >  arch/arm/mach-imx/Makefile                         |
> 2 +
> > > > > >  arch/arm/mach-imx/cpu.c                            |
> 16
> > > +-
> > > > > >  arch/arm/mach-imx/imx8m/Kconfig                    |
> 28
> > > +-
> > > > > >  arch/arm/mach-imx/imx8m/Makefile                   |
> 4
> > > +-
> > > > > >  arch/arm/mach-imx/imx8m/clock_imx8mm.c             |
> 707
> > > > > +++++++
> > > > > >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
> > > > > >  arch/arm/mach-imx/imx8m/clock_slice.c              |  815
> > > > > ++++++++
> > > > > >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |
> 16 +
> > > > > >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |
> 17 +
> > > > > >  arch/arm/mach-imx/imx8m/soc.c                      |
> 162
> > > +-
> > > > > >  arch/arm/mach-imx/spl.c                            |
> 8 +
> > > > > >  arch/arm/mach-imx/spl_imx_romapi.c                 |
> 292
> > > +++
> > > > > >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5
> +-
> > > > > >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5
> +-
> > > > > >  arch/arm/mach-rockchip/rk3399-board-spl.c          |    5
> +-
> > > > > >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5
> +-
> > > > > >  board/freescale/imx8mm_evk/Kconfig                 |   12
> +
> > > > > >  board/freescale/imx8mm_evk/MAINTAINERS             |
> 6
> > > +
> > > > > >  board/freescale/imx8mm_evk/Makefile                |
> 12 +
> > > > > >  board/freescale/imx8mm_evk/imx8mm_evk.c            |
> 90
> > > +
> > > > > >  board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> > > > > > ++++++++++++++++++++
> > > > > > board/freescale/imx8mm_evk/spl.c                   |  216
> +++
> > > > > > board/freescale/imx8mn_evk/Kconfig                 |   14 +
> > > > > > board/freescale/imx8mn_evk/MAINTAINERS             |    6
> +
> > > > > > board/freescale/imx8mn_evk/Makefile                |   12 +
> > > > > > board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
> > > > > > ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c
> > > > > |
> > > > > > 85 + board/freescale/imx8mn_evk/spl.c                   |
> > > > > > 91
> > > +
> > > > > > board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
> > > > > > common/spl/spl_bootrom.c                           |    7
> +-
> > > > > > configs/imx8mm_evk_defconfig                       |   51
> +
> > > > > > configs/imx8mn_ddr4_evk_defconfig                  |   55 +
> > > > > > drivers/clk/clk-uclass.c                           |    3 +
> > > > > > drivers/clk/imx/Kconfig                            |   14 +
> > > > > > drivers/clk/imx/Makefile                           |    1 +
> > > > > > drivers/clk/imx/clk-imx8mm.c                       |  121
> ++
> > > > > > drivers/ddr/imx/imx8m/Kconfig                      |    6 +
> > > > > > drivers/ddr/imx/imx8m/Makefile                     |    4
> +-
> > > > > > drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
> > > > > > drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
> > > > > > drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
> > > > > > drivers/ddr/imx/imx8m/helper.c                     |   22 +-
> > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
> > > > > > drivers/i2c/mxc_i2c.c                              |   24
> +-
> > > > > > drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
> > > > > > drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
> > > > > > drivers/power/pmic/Kconfig                         |   12 +
> > > > > > drivers/power/pmic/Makefile                        |    2
> +-
> > > > > > drivers/serial/Kconfig                             |    2 +-
> > > > > > include/configs/imx8mm_evk.h                       |  200
> ++
> > > > > > include/configs/imx8mn_evk.h                       |  198
> ++
> > > > > > include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
> > > > > > include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
> > > > > > include/imximage.h                                 |    1
> +
> > > > > > include/linux/compat.h                             |    2 +
> > > > > > include/power/pmic.h                               |    2
> +-
> > > > > > include/spl.h                                      |    3
> +-
> > > > > > tools/imx8m_image.sh                               |
> 15 +-
> > > > > > tools/imx8mimage.c                                 |
> 31 +-
> > > 79
> > > > > files
> > > > > > changed, 13082 insertions(+), 814 deletions(-) create mode
> > > > > > 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
> > > > > > arch/arm/dts/imx8mm-evk.dts create mode 100644
> > > > > > arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> > > > > > arch/arm/dts/imx8mm.dtsi create mode 100644
> > > > > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
> > > > > > arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> > > > > > arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> > > > > > arch/arm/dts/imx8mn.dtsi create mode 100644
> > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode
> > > 100644
> > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode
> > > 100644
> > > > > > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode
> > > 100644
> > > > > > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode
> > > 100644
> > > > > > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > > > > > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%)
> > > > > > create
> > > > > mode
> > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > > create
> > > > > mode
> > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create
> > > mode
> > > > > > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
> > > > > > board/freescale/imx8mm_evk/Kconfig create mode 100644
> > > > > > board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
> > > > > > board/freescale/imx8mm_evk/Makefile create mode 100644
> > > > > > board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
> > > > > > board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
> > > > > > board/freescale/imx8mm_evk/spl.c create mode 100644
> > > > > > board/freescale/imx8mn_evk/Kconfig create mode 100644
> > > > > > board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
> > > > > > board/freescale/imx8mn_evk/Makefile create mode 100644
> > > > > > board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
> > > > > > board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
> > > > > > board/freescale/imx8mn_evk/spl.c create mode 100644
> > > > > > configs/imx8mm_evk_defconfig create mode 100644
> > > > > > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > > > > > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > > > > > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > > > > > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > > > > > include/configs/imx8mm_evk.h create mode 100644
> > > > > > include/configs/imx8mn_evk.h create mode 100644
> > > > > > include/dt-bindings/clock/imx8mm-clock.h create mode 100644
> > > > > > include/dt-bindings/clock/imx8mn-clock.h
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Lukasz Majewski
> > > > >
> > > > > --
> > > > >
> > > > > DENX Software Engineering GmbH,      Managing Director:
> Wolfgang
> > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > > (+49)-8142-66989-80 Email: lukma@denx.de
> > >
> > >
> > >
> > >
> > > Best regards,
> > >
> > > Lukasz Majewski
> > >
> > > --
> > >
> > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > > lukma@denx.de
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de
Frieder Schrempf July 8, 2019, 8:41 a.m. UTC | #7
On 08.07.19 09:47, Peng Fan wrote:
> Hi Lukasz,
> 
>> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
>>
>> Hi Peng,
>>
>>>> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
>>>>
>>>> Hi Peng,
>>>>
>>>>> From: Peng Fan <peng.fan@nxp.com>
>>>>>
>>>>> This patchset is to support i.MX8MM/8MN with some update in ddr
>>>>> settings and ddr driver update.
>>>>>
>>>>> The initial patchset to support i.MX8MM is
>>>>> https://patchwork.ozlabs.org/cover/1093140/
>>>>> But in this patchset I dropped CCF, and use original CLK uclass,
>>>>> so not use V2 in patchset.
>>>>
>>>> I'm a bit confused here regarding the CCF adoption.
>>>>
>>>>  From this patch set I do see that in one place you enable
>>>> CONFIG_CLK_CCF and CONFIG_SPL_CLK_CCF and then it is removed in
>> the
>>>> other patch. For example the patch 48/52 extends the
>>>> drivers/clk/imx/clk-imx8mm.c, which looks like the old approach for
>>>> the clocking.
>>>
>>> The v2 patchset has cleanup
>>> https://github.com/MrVan/u-boot/tree/8m-7-5
>>>
>>>>
>>>> Am I correct that the v2 of this patch set will use the CCF v5,
>>>> which I've sent some time ago (CCF v4 was used on some i.MX8 SoC
>>>> though)?
>>>
>>> No. I tried CCF on i.MX8MM in previous patchset, but I dropped it for
>>> now.
>>
>> If I may ask - why have you dropped it?
> 
> To support i.MX8M, lots of code needs to be added, one is composite.
> We also needs clock settings, not just read.
> 
>>
>> The v5 of CCF has been posted ~2 weeks ago (with you on CC) with a high
>> chance to be pulled by Stefano after the merge window opens.
>>
>> When we accept the "legacy" clock approach we will stuck with it for a long
>> time.
>>
>> What approach is took by the Linux kernel? CCF or any other one?
> 
> I am not against CCF. I tried CCF and enabled on i.MX8MM in my last
> patchset. But I have to add lots of code based on your version, that
> introduces complexity for now.
> 
>>
>>> We might try to switch to CCF again in future,
>>
>> I'm a bit skeptical about such statements. It never works like that - after it is
>> accepted it would become a "legacy code which we do need to preserve".
>>
>>> but we hope
>>> i.MX8MM/N support could land in upstream soon. It has been pending for
>>> months.
>>
>> Was the CCF the reason for the i.MX8 not being pulled for so long?
> 
> I am not saying so.
> 
> The first version to support i.MX8MM is in 2019-01-28. Then I switch
> to CCF and posted out new version in 2019-4-30. we have many 3rd
> parties want to use mainline U-Boot, not our vendor tree.I hope
> i.MX8MM/N could land in the coming merge window, introducing
> more to CCF add risk.

Offtopic: Just my 2 cents, but people have good reasons for using 
mainline instead of the NXP vendor tree. And as you (NXP) realize this, 
I'm still wondering, why you don't just develop the SoC-support against 
mainline instead of your downstream tree in the first place.

It seems like you still put lots of resources in developing downstream 
and promoting the downstream tree and only very little in bringing the 
changes to upstream. So far there have been almost no responses to the 
i.MX8MM patches except for the CCF-related discussions with Lukasz.

This probably means that nobody else is working on upstreaming, not even 
some other NXP developers, that could test and review your patches. So 
you can't expect to make any progress like this, no matter if CCF is 
used or not.

We (Kontron Electronics) are interested in good mainline support for 
i.MX8MM and as I already announced I will try to use some of the time I 
have to work on i.MX8MM to provide feedback to your patches.

But in my opinion it would be a good idea for NXP to finally improve 
their upstreaming efforts. You could learn a lesson from other vendors 
like for example ST. They only started contributing their "first" 
microprocessor platform (STM32MP1) not too long ago, but figured out 
that mainlining their changes is very important from the beginning.
To me it seems that Freescale/NXP has failed to realize this for many years.

Sorry for the rant. This has nothing to do with you personally, Peng.

Regards,
Frieder

> 
> Thanks,
> Peng.
> 
>>
>>>
>>> Regards,
>>> Peng.
>>>
>>>>
>>>>>
>>>>> Bai Ping (1):
>>>>>    imx8mq: Update the ddrc QoS setting for B1 chip
>>>>>
>>>>> Jacky Bai (2):
>>>>>    driver: ddr: Refine the ddr init driver on imx8m
>>>>>    ddr: imx8m: Fix the ddr init hang on imx8mq
>>>>>
>>>>> Peng Fan (47):
>>>>>    linux: compat: guard PAGE_SIZE
>>>>>    dm: clk: ignore default settings when node not valid
>>>>>    pinctrl: imx: use devfdt_get_addr_size_index
>>>>>    i2c: mxc: add CONFIG_CLK support
>>>>>    tools: imx8m_image: align spl bin image size
>>>>>    ddr: imx8m: fix ddr firmware location when enable SPL OF
>>>>>    tools: imx8mimage: fix HDMI/FIT parsing
>>>>>    imx8m: add image cfg for i.MX8MM lpddr4
>>>>>    imx: add IMX8MQ kconfig entry
>>>>>    imx: add IMX8MM kconfig entry
>>>>>    imx: imx8mm: add clock bindings header
>>>>>    imx: add i.MX8MM cpu type
>>>>>    imx: spl: add spl_board_boot_device for i.MX8MM
>>>>>    imx8m: update imx-regs for i.MX8MM
>>>>>    imx: add get_cpu_rev support for i.MX8MM
>>>>>    imx8m: rename clock to clock_imx8mq
>>>>>    imx8m: restructure clock.h
>>>>>    imx8m: add clk support for i.MX8MM
>>>>>    imx8m: soc: probe clk before relocation
>>>>>    imx8m: add pin header for i.MX8MM
>>>>>    imx: add i.MX8MM PE property
>>>>>    imx8m: Fix MMU table issue for OPTEE memory
>>>>>    imx8m: set BYPASS ID SWAP to avoid AXI bus errors
>>>>>    imx8m: soc: enable SCTR clock before timer init
>>>>>    serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
>>>>>    clk: imx: add Kconfig entry for i.MX8MM
>>>>>    clk: imx: add i.MX8MM clk driver
>>>>>    imx: add i.MX8MM EVK board support
>>>>>    imx: add i.MX8MN kconfig entry
>>>>>    imx8mn: support get_cpu_rev
>>>>>    imx8m: add clk support for i.MX8MN
>>>>>    imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
>>>>>    imx: add i.MX8MN PE property
>>>>>    imx8mn: add pin header
>>>>>    imx: spl: use spl_board_boot_device for i.MX8MN
>>>>>    spl: pass args to board_return_to_bootrom
>>>>>    imx: add rom api support
>>>>>    imx: cpu: restrict get_boot_device
>>>>>    imx8mn: add get_boot_device
>>>>>    power: pmic: add SPL_DM_PMIC
>>>>>    tools: imx8mimage: add ROM VERSION
>>>>>    pinctrl: imx8m: support i.MX8MN
>>>>>    tools: imx8m_image: support ddr4 firmware
>>>>>    clk: imx: add i.MX8MN clk support
>>>>>    imx8m: add i.MX8MN ddr4 image cfg file
>>>>>    imx: add dtsi for i.MX8MN
>>>>>    imx: add i.MX8MN DDR4 board support
>>>>>
>>>>> Ye Li (2):
>>>>>    imx8m: Configure trustzone region 0 for non-secure access
>>>>>    ddr: imx8m: Fix ddr4 driver build issue
>>>>>
>>>>>   arch/arm/dts/Makefile                              |    4
>> +-
>>>>>   arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92 +
>>>>>   arch/arm/dts/imx8mm-evk.dts                        |  235
>> +++
>>>>>   arch/arm/dts/imx8mm-pinfunc.h                      |  629
>>>> +++++++
>>>>>   arch/arm/dts/imx8mm.dtsi                           |  733
>>>> ++++++++
>>>>>   arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
>>>>>   arch/arm/dts/imx8mn-ddr4-evk.dts                   |  221
>> +++
>>>>>   arch/arm/dts/imx8mn-pinfunc.h                      |  646
>>>> +++++++
>>>>>   arch/arm/dts/imx8mn.dtsi                           |  712
>>>> +++++++
>>>>>   arch/arm/include/asm/arch-imx/cpu.h                |    7 +
>>>>>   arch/arm/include/asm/arch-imx8m/clock.h            |  494
>> +----
>>>>>   arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |  465
>>>> +++++
>>>>>   arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424
>> +++++
>>>>>   arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75 +-
>>>>>   arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |  691
>>>> +++++++
>>>>>   arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763
>>>> ++++++++
>>>>>   arch/arm/include/asm/mach-imx/iomux-v3.h           |    4 +
>>>>>   arch/arm/include/asm/mach-imx/mxc_i2c.h            |    2 +
>>>>>   arch/arm/include/asm/mach-imx/sys_proto.h          |   42 +
>>>>>   arch/arm/mach-imx/Kconfig                          |    4 +
>>>>>   arch/arm/mach-imx/Makefile                         |    2 +
>>>>>   arch/arm/mach-imx/cpu.c                            |   16
>> +-
>>>>>   arch/arm/mach-imx/imx8m/Kconfig                    |   28
>> +-
>>>>>   arch/arm/mach-imx/imx8m/Makefile                   |    4
>> +-
>>>>>   arch/arm/mach-imx/imx8m/clock_imx8mm.c             |  707
>>>> +++++++
>>>>>   .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
>>>>>   arch/arm/mach-imx/imx8m/clock_slice.c              |  815
>>>> ++++++++
>>>>>   arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |   16 +
>>>>>   arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |   17 +
>>>>>   arch/arm/mach-imx/imx8m/soc.c                      |  162
>> +-
>>>>>   arch/arm/mach-imx/spl.c                            |    8 +
>>>>>   arch/arm/mach-imx/spl_imx_romapi.c                 |  292
>> +++
>>>>>   arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5 +-
>>>>>   arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5 +-
>>>>>   arch/arm/mach-rockchip/rk3399-board-spl.c          |    5 +-
>>>>>   arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5 +-
>>>>>   board/freescale/imx8mm_evk/Kconfig                 |   12 +
>>>>>   board/freescale/imx8mm_evk/MAINTAINERS             |    6
>> +
>>>>>   board/freescale/imx8mm_evk/Makefile                |   12 +
>>>>>   board/freescale/imx8mm_evk/imx8mm_evk.c            |   90
>> +
>>>>>   board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
>>>>> ++++++++++++++++++++
>>>>> board/freescale/imx8mm_evk/spl.c                   |  216 +++
>>>>> board/freescale/imx8mn_evk/Kconfig                 |   14 +
>>>>> board/freescale/imx8mn_evk/MAINTAINERS             |    6 +
>>>>> board/freescale/imx8mn_evk/Makefile                |   12 +
>>>>> board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
>>>>> ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c
>>>> |
>>>>> 85 + board/freescale/imx8mn_evk/spl.c                   |   91
>> +
>>>>> board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
>>>>> common/spl/spl_bootrom.c                           |    7 +-
>>>>> configs/imx8mm_evk_defconfig                       |   51 +
>>>>> configs/imx8mn_ddr4_evk_defconfig                  |   55 +
>>>>> drivers/clk/clk-uclass.c                           |    3 +
>>>>> drivers/clk/imx/Kconfig                            |   14 +
>>>>> drivers/clk/imx/Makefile                           |    1 +
>>>>> drivers/clk/imx/clk-imx8mm.c                       |  121 ++
>>>>> drivers/ddr/imx/imx8m/Kconfig                      |    6 +
>>>>> drivers/ddr/imx/imx8m/Makefile                     |    4 +-
>>>>> drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
>>>>> drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
>>>>> drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
>>>>> drivers/ddr/imx/imx8m/helper.c                     |   22 +-
>>>>> drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
>>>>> drivers/i2c/mxc_i2c.c                              |   24 +-
>>>>> drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
>>>>> drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
>>>>> drivers/power/pmic/Kconfig                         |   12 +
>>>>> drivers/power/pmic/Makefile                        |    2 +-
>>>>> drivers/serial/Kconfig                             |    2 +-
>>>>> include/configs/imx8mm_evk.h                       |  200 ++
>>>>> include/configs/imx8mn_evk.h                       |  198 ++
>>>>> include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
>>>>> include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
>>>>> include/imximage.h                                 |    1 +
>>>>> include/linux/compat.h                             |    2 +
>>>>> include/power/pmic.h                               |    2 +-
>>>>> include/spl.h                                      |    3 +-
>>>>> tools/imx8m_image.sh                               |   15 +-
>>>>> tools/imx8mimage.c                                 |   31 +-
>> 79
>>>> files
>>>>> changed, 13082 insertions(+), 814 deletions(-) create mode 100644
>>>>> arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
>>>>> arch/arm/dts/imx8mm-evk.dts create mode 100644
>>>>> arch/arm/dts/imx8mm-pinfunc.h create mode 100644
>>>>> arch/arm/dts/imx8mm.dtsi create mode 100644
>>>>> arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
>>>>> arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
>>>>> arch/arm/dts/imx8mn-pinfunc.h create mode 100644
>>>>> arch/arm/dts/imx8mn.dtsi create mode 100644
>>>>> arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode
>> 100644
>>>>> arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode
>> 100644
>>>>> arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode
>> 100644
>>>>> arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode
>> 100644
>>>>> arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
>>>>> arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%) create
>>>> mode
>>>>> 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg create
>>>> mode
>>>>> 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create
>> mode
>>>>> 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
>>>>> board/freescale/imx8mm_evk/Kconfig create mode 100644
>>>>> board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
>>>>> board/freescale/imx8mm_evk/Makefile create mode 100644
>>>>> board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
>>>>> board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
>>>>> board/freescale/imx8mm_evk/spl.c create mode 100644
>>>>> board/freescale/imx8mn_evk/Kconfig create mode 100644
>>>>> board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
>>>>> board/freescale/imx8mn_evk/Makefile create mode 100644
>>>>> board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
>>>>> board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
>>>>> board/freescale/imx8mn_evk/spl.c create mode 100644
>>>>> configs/imx8mm_evk_defconfig create mode 100644
>>>>> configs/imx8mn_ddr4_evk_defconfig create mode 100644
>>>>> drivers/clk/imx/clk-imx8mm.c delete mode 100644
>>>>> drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
>>>>> drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
>>>>> drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
>>>>> include/configs/imx8mm_evk.h create mode 100644
>>>>> include/configs/imx8mn_evk.h create mode 100644
>>>>> include/dt-bindings/clock/imx8mm-clock.h create mode 100644
>>>>> include/dt-bindings/clock/imx8mn-clock.h
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Best regards,
>>>>
>>>> Lukasz Majewski
>>>>
>>>> --
>>>>
>>>> DENX Software Engineering GmbH,      Managing Director: Wolfgang
>>>> Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
>>>> Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
>>>> lukma@denx.de
>>
>>
>>
>>
>> Best regards,
>>
>> Lukasz Majewski
>>
>> --
>>
>> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
>> lukma@denx.de
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
Peng Fan July 8, 2019, 8:53 a.m. UTC | #8
> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> 
> On 08.07.19 09:47, Peng Fan wrote:
> > Hi Lukasz,
> >
> >> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> >>
> >> Hi Peng,
> >>
> >>>> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> >>>>
> >>>> Hi Peng,
> >>>>
> >>>>> From: Peng Fan <peng.fan@nxp.com>
> >>>>>
> >>>>> This patchset is to support i.MX8MM/8MN with some update in ddr
> >>>>> settings and ddr driver update.
> >>>>>
> >>>>> The initial patchset to support i.MX8MM is
> >>>>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> >>>>>
> patchwork.ozlabs.org%2Fcover%2F1093140%2F&amp;data=02%7C01%7Cpe
> ng.
> >>>>>
> fan%40nxp.com%7C22bf1d278ff84b83992808d703801185%7C686ea1d3bc2
> b4c6
> >>>>>
> fa92cd99c5c301635%7C0%7C0%7C636981720896878860&amp;sdata=sT41
> oDo7v
> >>>>> 9D2b1reCpqJJ055SGQcGkrQWOkmB8Vcc%2F4%3D&amp;reserved=0
> >>>>> But in this patchset I dropped CCF, and use original CLK uclass,
> >>>>> so not use V2 in patchset.
> >>>>
> >>>> I'm a bit confused here regarding the CCF adoption.
> >>>>
> >>>>  From this patch set I do see that in one place you enable
> >>>> CONFIG_CLK_CCF and CONFIG_SPL_CLK_CCF and then it is removed in
> >> the
> >>>> other patch. For example the patch 48/52 extends the
> >>>> drivers/clk/imx/clk-imx8mm.c, which looks like the old approach for
> >>>> the clocking.
> >>>
> >>> The v2 patchset has cleanup
> >>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
> >>>
> thub.com%2FMrVan%2Fu-boot%2Ftree%2F8m-7-5&amp;data=02%7C01%7C
> peng.fa
> >>>
> n%40nxp.com%7C22bf1d278ff84b83992808d703801185%7C686ea1d3bc2b4
> c6fa92
> >>>
> cd99c5c301635%7C0%7C0%7C636981720896878860&amp;sdata=TXp4PTd8l
> rO1DVY
> >>> L2Mzhzgz%2Fr084yIX0t4zlta%2BGjpY%3D&amp;reserved=0
> >>>
> >>>>
> >>>> Am I correct that the v2 of this patch set will use the CCF v5,
> >>>> which I've sent some time ago (CCF v4 was used on some i.MX8 SoC
> >>>> though)?
> >>>
> >>> No. I tried CCF on i.MX8MM in previous patchset, but I dropped it
> >>> for now.
> >>
> >> If I may ask - why have you dropped it?
> >
> > To support i.MX8M, lots of code needs to be added, one is composite.
> > We also needs clock settings, not just read.
> >
> >>
> >> The v5 of CCF has been posted ~2 weeks ago (with you on CC) with a
> >> high chance to be pulled by Stefano after the merge window opens.
> >>
> >> When we accept the "legacy" clock approach we will stuck with it for
> >> a long time.
> >>
> >> What approach is took by the Linux kernel? CCF or any other one?
> >
> > I am not against CCF. I tried CCF and enabled on i.MX8MM in my last
> > patchset. But I have to add lots of code based on your version, that
> > introduces complexity for now.
> >
> >>
> >>> We might try to switch to CCF again in future,
> >>
> >> I'm a bit skeptical about such statements. It never works like that -
> >> after it is accepted it would become a "legacy code which we do need to
> preserve".
> >>
> >>> but we hope
> >>> i.MX8MM/N support could land in upstream soon. It has been pending
> >>> for months.
> >>
> >> Was the CCF the reason for the i.MX8 not being pulled for so long?
> >
> > I am not saying so.
> >
> > The first version to support i.MX8MM is in 2019-01-28. Then I switch
> > to CCF and posted out new version in 2019-4-30. we have many 3rd
> > parties want to use mainline U-Boot, not our vendor tree.I hope
> > i.MX8MM/N could land in the coming merge window, introducing more to
> > CCF add risk.
> 
> Offtopic: Just my 2 cents, but people have good reasons for using mainline
> instead of the NXP vendor tree. And as you (NXP) realize this, I'm still
> wondering, why you don't just develop the SoC-support against mainline
> instead of your downstream tree in the first place.
> 
> It seems like you still put lots of resources in developing downstream and
> promoting the downstream tree and only very little in bringing the changes to
> upstream. So far there have been almost no responses to the i.MX8MM
> patches except for the CCF-related discussions with Lukasz.

Quality is very important in a release cycle, that is to support mass production
for customers. For releases not dedicated for a single SoC, we need to cover
lots of SoCs, not just a single SoC, in NXP release cycle, i.MX6/7/8 will all go
through test cycle. Following upstream release cycle for i.MX family will
require huge efforts. Anyway we are trying to upstream our latest code
as early as possible.

> 
> This probably means that nobody else is working on upstreaming, not even
> some other NXP developers, that could test and review your patches. So you
> can't expect to make any progress like this, no matter if CCF is used or not.

We do have distro partners only use upstream code.

> 
> We (Kontron Electronics) are interested in good mainline support for
> i.MX8MM and as I already announced I will try to use some of the time I have
> to work on i.MX8MM to provide feedback to your patches.

Thanks.

> 
> But in my opinion it would be a good idea for NXP to finally improve their
> upstreaming efforts. You could learn a lesson from other vendors like for
> example ST. They only started contributing their "first"
> microprocessor platform (STM32MP1) not too long ago, but figured out that
> mainlining their changes is very important from the beginning.
> To me it seems that Freescale/NXP has failed to realize this for many years.

Things are changing, we are putting more resources to community.

> 
> Sorry for the rant. This has nothing to do with you personally, Peng.

Understand.

Thanks,
Peng.

> 
> Regards,
> Frieder
> 
> >
> > Thanks,
> > Peng.
> >
> >>
> >>>
> >>> Regards,
> >>> Peng.
> >>>
> >>>>
> >>>>>
> >>>>> Bai Ping (1):
> >>>>>    imx8mq: Update the ddrc QoS setting for B1 chip
> >>>>>
> >>>>> Jacky Bai (2):
> >>>>>    driver: ddr: Refine the ddr init driver on imx8m
> >>>>>    ddr: imx8m: Fix the ddr init hang on imx8mq
> >>>>>
> >>>>> Peng Fan (47):
> >>>>>    linux: compat: guard PAGE_SIZE
> >>>>>    dm: clk: ignore default settings when node not valid
> >>>>>    pinctrl: imx: use devfdt_get_addr_size_index
> >>>>>    i2c: mxc: add CONFIG_CLK support
> >>>>>    tools: imx8m_image: align spl bin image size
> >>>>>    ddr: imx8m: fix ddr firmware location when enable SPL OF
> >>>>>    tools: imx8mimage: fix HDMI/FIT parsing
> >>>>>    imx8m: add image cfg for i.MX8MM lpddr4
> >>>>>    imx: add IMX8MQ kconfig entry
> >>>>>    imx: add IMX8MM kconfig entry
> >>>>>    imx: imx8mm: add clock bindings header
> >>>>>    imx: add i.MX8MM cpu type
> >>>>>    imx: spl: add spl_board_boot_device for i.MX8MM
> >>>>>    imx8m: update imx-regs for i.MX8MM
> >>>>>    imx: add get_cpu_rev support for i.MX8MM
> >>>>>    imx8m: rename clock to clock_imx8mq
> >>>>>    imx8m: restructure clock.h
> >>>>>    imx8m: add clk support for i.MX8MM
> >>>>>    imx8m: soc: probe clk before relocation
> >>>>>    imx8m: add pin header for i.MX8MM
> >>>>>    imx: add i.MX8MM PE property
> >>>>>    imx8m: Fix MMU table issue for OPTEE memory
> >>>>>    imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> >>>>>    imx8m: soc: enable SCTR clock before timer init
> >>>>>    serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
> >>>>>    clk: imx: add Kconfig entry for i.MX8MM
> >>>>>    clk: imx: add i.MX8MM clk driver
> >>>>>    imx: add i.MX8MM EVK board support
> >>>>>    imx: add i.MX8MN kconfig entry
> >>>>>    imx8mn: support get_cpu_rev
> >>>>>    imx8m: add clk support for i.MX8MN
> >>>>>    imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> >>>>>    imx: add i.MX8MN PE property
> >>>>>    imx8mn: add pin header
> >>>>>    imx: spl: use spl_board_boot_device for i.MX8MN
> >>>>>    spl: pass args to board_return_to_bootrom
> >>>>>    imx: add rom api support
> >>>>>    imx: cpu: restrict get_boot_device
> >>>>>    imx8mn: add get_boot_device
> >>>>>    power: pmic: add SPL_DM_PMIC
> >>>>>    tools: imx8mimage: add ROM VERSION
> >>>>>    pinctrl: imx8m: support i.MX8MN
> >>>>>    tools: imx8m_image: support ddr4 firmware
> >>>>>    clk: imx: add i.MX8MN clk support
> >>>>>    imx8m: add i.MX8MN ddr4 image cfg file
> >>>>>    imx: add dtsi for i.MX8MN
> >>>>>    imx: add i.MX8MN DDR4 board support
> >>>>>
> >>>>> Ye Li (2):
> >>>>>    imx8m: Configure trustzone region 0 for non-secure access
> >>>>>    ddr: imx8m: Fix ddr4 driver build issue
> >>>>>
> >>>>>   arch/arm/dts/Makefile                              |
> 4
> >> +-
> >>>>>   arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92
> +
> >>>>>   arch/arm/dts/imx8mm-evk.dts                        |
> 235
> >> +++
> >>>>>   arch/arm/dts/imx8mm-pinfunc.h                      |
> 629
> >>>> +++++++
> >>>>>   arch/arm/dts/imx8mm.dtsi                           |
> 733
> >>>> ++++++++
> >>>>>   arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
> >>>>>   arch/arm/dts/imx8mn-ddr4-evk.dts                   |  221
> >> +++
> >>>>>   arch/arm/dts/imx8mn-pinfunc.h                      |  646
> >>>> +++++++
> >>>>>   arch/arm/dts/imx8mn.dtsi                           |  712
> >>>> +++++++
> >>>>>   arch/arm/include/asm/arch-imx/cpu.h                |    7
> +
> >>>>>   arch/arm/include/asm/arch-imx8m/clock.h            |  494
> >> +----
> >>>>>   arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |  465
> >>>> +++++
> >>>>>   arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424
> >> +++++
> >>>>>   arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75
> +-
> >>>>>   arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |  691
> >>>> +++++++
> >>>>>   arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763
> >>>> ++++++++
> >>>>>   arch/arm/include/asm/mach-imx/iomux-v3.h           |    4
> +
> >>>>>   arch/arm/include/asm/mach-imx/mxc_i2c.h            |    2
> +
> >>>>>   arch/arm/include/asm/mach-imx/sys_proto.h          |   42
> +
> >>>>>   arch/arm/mach-imx/Kconfig                          |
> 4 +
> >>>>>   arch/arm/mach-imx/Makefile                         |
> 2 +
> >>>>>   arch/arm/mach-imx/cpu.c                            |
> 16
> >> +-
> >>>>>   arch/arm/mach-imx/imx8m/Kconfig                    |
> 28
> >> +-
> >>>>>   arch/arm/mach-imx/imx8m/Makefile                   |
> 4
> >> +-
> >>>>>   arch/arm/mach-imx/imx8m/clock_imx8mm.c             |
> 707
> >>>> +++++++
> >>>>>   .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
> >>>>>   arch/arm/mach-imx/imx8m/clock_slice.c              |  815
> >>>> ++++++++
> >>>>>   arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |
> 16 +
> >>>>>   arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |
> 17 +
> >>>>>   arch/arm/mach-imx/imx8m/soc.c                      |
> 162
> >> +-
> >>>>>   arch/arm/mach-imx/spl.c                            |
> 8 +
> >>>>>   arch/arm/mach-imx/spl_imx_romapi.c                 |  292
> >> +++
> >>>>>   arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5 +-
> >>>>>   arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5 +-
> >>>>>   arch/arm/mach-rockchip/rk3399-board-spl.c          |    5 +-
> >>>>>   arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5 +-
> >>>>>   board/freescale/imx8mm_evk/Kconfig                 |   12
> +
> >>>>>   board/freescale/imx8mm_evk/MAINTAINERS             |
> 6
> >> +
> >>>>>   board/freescale/imx8mm_evk/Makefile                |   12
> +
> >>>>>   board/freescale/imx8mm_evk/imx8mm_evk.c            |
> 90
> >> +
> >>>>>   board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> >>>>> ++++++++++++++++++++
> >>>>> board/freescale/imx8mm_evk/spl.c                   |  216
> +++
> >>>>> board/freescale/imx8mn_evk/Kconfig                 |   14 +
> >>>>> board/freescale/imx8mn_evk/MAINTAINERS             |    6 +
> >>>>> board/freescale/imx8mn_evk/Makefile                |   12 +
> >>>>> board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
> >>>>> ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c
> >>>> |
> >>>>> 85 + board/freescale/imx8mn_evk/spl.c                   |   91
> >> +
> >>>>> board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
> >>>>> common/spl/spl_bootrom.c                           |    7
> +-
> >>>>> configs/imx8mm_evk_defconfig                       |   51 +
> >>>>> configs/imx8mn_ddr4_evk_defconfig                  |   55 +
> >>>>> drivers/clk/clk-uclass.c                           |    3 +
> >>>>> drivers/clk/imx/Kconfig                            |   14 +
> >>>>> drivers/clk/imx/Makefile                           |    1 +
> >>>>> drivers/clk/imx/clk-imx8mm.c                       |  121 ++
> >>>>> drivers/ddr/imx/imx8m/Kconfig                      |    6 +
> >>>>> drivers/ddr/imx/imx8m/Makefile                     |    4 +-
> >>>>> drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
> >>>>> drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
> >>>>> drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
> >>>>> drivers/ddr/imx/imx8m/helper.c                     |   22 +-
> >>>>> drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
> >>>>> drivers/i2c/mxc_i2c.c                              |   24 +-
> >>>>> drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
> >>>>> drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
> >>>>> drivers/power/pmic/Kconfig                         |   12 +
> >>>>> drivers/power/pmic/Makefile                        |    2 +-
> >>>>> drivers/serial/Kconfig                             |    2 +-
> >>>>> include/configs/imx8mm_evk.h                       |  200 ++
> >>>>> include/configs/imx8mn_evk.h                       |  198 ++
> >>>>> include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
> >>>>> include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
> >>>>> include/imximage.h                                 |    1 +
> >>>>> include/linux/compat.h                             |    2 +
> >>>>> include/power/pmic.h                               |    2 +-
> >>>>> include/spl.h                                      |    3 +-
> >>>>> tools/imx8m_image.sh                               |   15
> +-
> >>>>> tools/imx8mimage.c                                 |   31
> +-
> >> 79
> >>>> files
> >>>>> changed, 13082 insertions(+), 814 deletions(-) create mode 100644
> >>>>> arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
> >>>>> arch/arm/dts/imx8mm-evk.dts create mode 100644
> >>>>> arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> >>>>> arch/arm/dts/imx8mm.dtsi create mode 100644
> >>>>> arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
> >>>>> arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> >>>>> arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> >>>>> arch/arm/dts/imx8mn.dtsi create mode 100644
> >>>>> arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode
> >> 100644
> >>>>> arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode
> >> 100644
> >>>>> arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode
> >> 100644
> >>>>> arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode
> >> 100644
> >>>>> arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> >>>>> arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%) create
> >>>> mode
> >>>>> 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg create
> >>>> mode
> >>>>> 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create
> >> mode
> >>>>> 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
> >>>>> board/freescale/imx8mm_evk/Kconfig create mode 100644
> >>>>> board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
> >>>>> board/freescale/imx8mm_evk/Makefile create mode 100644
> >>>>> board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
> >>>>> board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
> >>>>> board/freescale/imx8mm_evk/spl.c create mode 100644
> >>>>> board/freescale/imx8mn_evk/Kconfig create mode 100644
> >>>>> board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
> >>>>> board/freescale/imx8mn_evk/Makefile create mode 100644
> >>>>> board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
> >>>>> board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
> >>>>> board/freescale/imx8mn_evk/spl.c create mode 100644
> >>>>> configs/imx8mm_evk_defconfig create mode 100644
> >>>>> configs/imx8mn_ddr4_evk_defconfig create mode 100644
> >>>>> drivers/clk/imx/clk-imx8mm.c delete mode 100644
> >>>>> drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> >>>>> drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> >>>>> drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> >>>>> include/configs/imx8mm_evk.h create mode 100644
> >>>>> include/configs/imx8mn_evk.h create mode 100644
> >>>>> include/dt-bindings/clock/imx8mm-clock.h create mode 100644
> >>>>> include/dt-bindings/clock/imx8mn-clock.h
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> Best regards,
> >>>>
> >>>> Lukasz Majewski
> >>>>
> >>>> --
> >>>>
> >>>> DENX Software Engineering GmbH,      Managing Director: Wolfgang
> >>>> Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> >>>> Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> >>>> lukma@denx.de
> >>
> >>
> >>
> >>
> >> Best regards,
> >>
> >> Lukasz Majewski
> >>
> >> --
> >>
> >> DENX Software Engineering GmbH,      Managing Director: Wolfgang
> Denk
> >> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> >> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> >> lukma@denx.de
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot@lists.denx.de
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> >
> s.denx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7Cpeng.fan%40nxp.co
> m%7C22bf1d278ff84b83992808d703801185%7C686ea1d3bc2b4c6fa92cd99
> c5c301635%7C0%7C0%7C636981720896878860&amp;sdata=jPqn%2BnYKN
> pYmr9p1JyMtk9FsthzaQ7yumcQlILXVM%2Bo%3D&amp;reserved=0
> >
Peng Fan July 17, 2019, 8:37 a.m. UTC | #9
Hi Lukasz, Stefano,

> > >
> > > > > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
[....]
> > >
> > > The v5 of CCF has been posted ~2 weeks ago (with you on CC) with a
> > > high chance to be pulled by Stefano after the merge window opens.
> > >
> > > When we accept the "legacy" clock approach we will stuck with it for
> > > a long time.
> > >
> > > What approach is took by the Linux kernel? CCF or any other one?
> >
> > I am not against CCF. I tried CCF and enabled on i.MX8MM in my last
> > patchset. But I have to add lots of code based on your version, that
> > introduces complexity for now.
> 
> You will have to add this complexity anyway after people start demanding
> new clocks for IPs which they need to enable.
> 
> Moreover, the CCF v5 was posted 2 weeks ago - wasn't it enough time for
> applying your patches from v4?

I have converted back to CCF for i.MX8MM/N. Pushed code
to https://github.com/MrVan/u-boot/commits/imx8mmn-ccf

Since there are 65 patches in my patchset, I not post to maillist.

Please see whether you have some general comments or not.
Then I'll post out to mail list. Hope it could catch this release cycle.

Thanks,
Peng.

> 
> >
> > >
> > > > We might try to switch to CCF again in future,
> > >
> > > I'm a bit skeptical about such statements. It never works like that
> > > - after it is accepted it would become a "legacy code which we do
> > > need to preserve".
> > > > but we hope
> > > > i.MX8MM/N support could land in upstream soon. It has been pending
> > > > for months.
> > >
> > > Was the CCF the reason for the i.MX8 not being pulled for so long?
> >
> > I am not saying so.
> >
> > The first version to support i.MX8MM is in 2019-01-28. Then I switch
> > to CCF and posted out new version in 2019-4-30.
> 
> Maybe the version posted in 2019-01-28 was just not ready for being pulled?
> 
> It happens that the community wants to avoid problems encountered earlier
> with other SoCs (like i.MX6, i.MX7), so the discussion takes time.
> 
> (The similar situation is with other projects too - how many release cycles it
> takes to add new SoC in Linux? Or new port to glibc?).
> 
> > we have many 3rd parties want to use mainline U-Boot, not our vendor
> > tree.
> 
> There must be a reason that they want the U-Boot mainline. IMHO the main
> reason for it is that people not only from a single company want to add the
> code, so they need to discuss (and get the agreement) to avoid stepping in
> each other's toes.
> 
> And the discussion/tests takes time ...
> 
> > I hope
> > i.MX8MM/N could land in the coming merge window,
> 
> This depends solely on the code quality I think.
> 
> > introducing more to CCF add risk.
> 
> Risk for not being accepted?
> 
> I do see however other risk - the i.MX8 will gain one-off clock support code
> instead of adopting the CCF just from the outset.
> 
> 
> >
> > Thanks,
> > Peng.
> >
> > >
> > > >
> > > > Regards,
> > > > Peng.
> > > >
> > > > >
> > > > > >
> > > > > > Bai Ping (1):
> > > > > >   imx8mq: Update the ddrc QoS setting for B1 chip
> > > > > >
> > > > > > Jacky Bai (2):
> > > > > >   driver: ddr: Refine the ddr init driver on imx8m
> > > > > >   ddr: imx8m: Fix the ddr init hang on imx8mq
> > > > > >
> > > > > > Peng Fan (47):
> > > > > >   linux: compat: guard PAGE_SIZE
> > > > > >   dm: clk: ignore default settings when node not valid
> > > > > >   pinctrl: imx: use devfdt_get_addr_size_index
> > > > > >   i2c: mxc: add CONFIG_CLK support
> > > > > >   tools: imx8m_image: align spl bin image size
> > > > > >   ddr: imx8m: fix ddr firmware location when enable SPL OF
> > > > > >   tools: imx8mimage: fix HDMI/FIT parsing
> > > > > >   imx8m: add image cfg for i.MX8MM lpddr4
> > > > > >   imx: add IMX8MQ kconfig entry
> > > > > >   imx: add IMX8MM kconfig entry
> > > > > >   imx: imx8mm: add clock bindings header
> > > > > >   imx: add i.MX8MM cpu type
> > > > > >   imx: spl: add spl_board_boot_device for i.MX8MM
> > > > > >   imx8m: update imx-regs for i.MX8MM
> > > > > >   imx: add get_cpu_rev support for i.MX8MM
> > > > > >   imx8m: rename clock to clock_imx8mq
> > > > > >   imx8m: restructure clock.h
> > > > > >   imx8m: add clk support for i.MX8MM
> > > > > >   imx8m: soc: probe clk before relocation
> > > > > >   imx8m: add pin header for i.MX8MM
> > > > > >   imx: add i.MX8MM PE property
> > > > > >   imx8m: Fix MMU table issue for OPTEE memory
> > > > > >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > >   imx8m: soc: enable SCTR clock before timer init
> > > > > >   serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
> > > > > >   clk: imx: add Kconfig entry for i.MX8MM
> > > > > >   clk: imx: add i.MX8MM clk driver
> > > > > >   imx: add i.MX8MM EVK board support
> > > > > >   imx: add i.MX8MN kconfig entry
> > > > > >   imx8mn: support get_cpu_rev
> > > > > >   imx8m: add clk support for i.MX8MN
> > > > > >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > >   imx: add i.MX8MN PE property
> > > > > >   imx8mn: add pin header
> > > > > >   imx: spl: use spl_board_boot_device for i.MX8MN
> > > > > >   spl: pass args to board_return_to_bootrom
> > > > > >   imx: add rom api support
> > > > > >   imx: cpu: restrict get_boot_device
> > > > > >   imx8mn: add get_boot_device
> > > > > >   power: pmic: add SPL_DM_PMIC
> > > > > >   tools: imx8mimage: add ROM VERSION
> > > > > >   pinctrl: imx8m: support i.MX8MN
> > > > > >   tools: imx8m_image: support ddr4 firmware
> > > > > >   clk: imx: add i.MX8MN clk support
> > > > > >   imx8m: add i.MX8MN ddr4 image cfg file
> > > > > >   imx: add dtsi for i.MX8MN
> > > > > >   imx: add i.MX8MN DDR4 board support
> > > > > >
> > > > > > Ye Li (2):
> > > > > >   imx8m: Configure trustzone region 0 for non-secure access
> > > > > >   ddr: imx8m: Fix ddr4 driver build issue
> > > > > >
> > > > > >  arch/arm/dts/Makefile                              |
> 4
> > > +-
> > > > > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92
> +
> > > > > >  arch/arm/dts/imx8mm-evk.dts                        |
> 235
> > > +++
> > > > > >  arch/arm/dts/imx8mm-pinfunc.h                      |
> 629
> > > > > +++++++
> > > > > >  arch/arm/dts/imx8mm.dtsi                           |
> 733
> > > > > ++++++++
> > > > > >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
> > > > > >  arch/arm/dts/imx8mn-ddr4-evk.dts                   |
> 221
> > > +++
> > > > > >  arch/arm/dts/imx8mn-pinfunc.h                      |
> 646
> > > > > +++++++
> > > > > >  arch/arm/dts/imx8mn.dtsi                           |
> 712
> > > > > +++++++
> > > > > >  arch/arm/include/asm/arch-imx/cpu.h                |    7
> +
> > > > > >  arch/arm/include/asm/arch-imx8m/clock.h            |  494
> > > +----
> > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |
> 465
> > > > > +++++
> > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424
> > > +++++
> > > > > >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75
> +-
> > > > > >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |
> 691
> > > > > +++++++
> > > > > >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763
> > > > > ++++++++
> > > > > >  arch/arm/include/asm/mach-imx/iomux-v3.h           |
> 4 +
> > > > > >  arch/arm/include/asm/mach-imx/mxc_i2c.h            |
> 2 +
> > > > > >  arch/arm/include/asm/mach-imx/sys_proto.h          |   42
> +
> > > > > >  arch/arm/mach-imx/Kconfig                          |
> 4 +
> > > > > >  arch/arm/mach-imx/Makefile                         |
> 2 +
> > > > > >  arch/arm/mach-imx/cpu.c                            |
> 16
> > > +-
> > > > > >  arch/arm/mach-imx/imx8m/Kconfig                    |
> 28
> > > +-
> > > > > >  arch/arm/mach-imx/imx8m/Makefile                   |
> 4
> > > +-
> > > > > >  arch/arm/mach-imx/imx8m/clock_imx8mm.c             |
> 707
> > > > > +++++++
> > > > > >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
> > > > > >  arch/arm/mach-imx/imx8m/clock_slice.c              |  815
> > > > > ++++++++
> > > > > >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |
> 16 +
> > > > > >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |
> 17 +
> > > > > >  arch/arm/mach-imx/imx8m/soc.c                      |
> 162
> > > +-
> > > > > >  arch/arm/mach-imx/spl.c                            |
> 8 +
> > > > > >  arch/arm/mach-imx/spl_imx_romapi.c                 |
> 292
> > > +++
> > > > > >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5
> +-
> > > > > >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5
> +-
> > > > > >  arch/arm/mach-rockchip/rk3399-board-spl.c          |    5
> +-
> > > > > >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5
> +-
> > > > > >  board/freescale/imx8mm_evk/Kconfig                 |   12
> +
> > > > > >  board/freescale/imx8mm_evk/MAINTAINERS             |
> 6
> > > +
> > > > > >  board/freescale/imx8mm_evk/Makefile                |
> 12 +
> > > > > >  board/freescale/imx8mm_evk/imx8mm_evk.c            |
> 90
> > > +
> > > > > >  board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> > > > > > ++++++++++++++++++++
> > > > > > board/freescale/imx8mm_evk/spl.c                   |  216
> +++
> > > > > > board/freescale/imx8mn_evk/Kconfig                 |   14 +
> > > > > > board/freescale/imx8mn_evk/MAINTAINERS             |    6
> +
> > > > > > board/freescale/imx8mn_evk/Makefile                |   12 +
> > > > > > board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
> > > > > > ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c
> > > > > |
> > > > > > 85 + board/freescale/imx8mn_evk/spl.c                   |
> > > > > > 91
> > > +
> > > > > > board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
> > > > > > common/spl/spl_bootrom.c                           |    7
> +-
> > > > > > configs/imx8mm_evk_defconfig                       |   51
> +
> > > > > > configs/imx8mn_ddr4_evk_defconfig                  |   55 +
> > > > > > drivers/clk/clk-uclass.c                           |    3 +
> > > > > > drivers/clk/imx/Kconfig                            |   14 +
> > > > > > drivers/clk/imx/Makefile                           |    1 +
> > > > > > drivers/clk/imx/clk-imx8mm.c                       |  121
> ++
> > > > > > drivers/ddr/imx/imx8m/Kconfig                      |    6 +
> > > > > > drivers/ddr/imx/imx8m/Makefile                     |    4
> +-
> > > > > > drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
> > > > > > drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
> > > > > > drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
> > > > > > drivers/ddr/imx/imx8m/helper.c                     |   22 +-
> > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
> > > > > > drivers/i2c/mxc_i2c.c                              |   24
> +-
> > > > > > drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
> > > > > > drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
> > > > > > drivers/power/pmic/Kconfig                         |   12 +
> > > > > > drivers/power/pmic/Makefile                        |    2
> +-
> > > > > > drivers/serial/Kconfig                             |    2 +-
> > > > > > include/configs/imx8mm_evk.h                       |  200
> ++
> > > > > > include/configs/imx8mn_evk.h                       |  198
> ++
> > > > > > include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
> > > > > > include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
> > > > > > include/imximage.h                                 |    1
> +
> > > > > > include/linux/compat.h                             |    2 +
> > > > > > include/power/pmic.h                               |    2
> +-
> > > > > > include/spl.h                                      |    3
> +-
> > > > > > tools/imx8m_image.sh                               |
> 15 +-
> > > > > > tools/imx8mimage.c                                 |
> 31 +-
> > > 79
> > > > > files
> > > > > > changed, 13082 insertions(+), 814 deletions(-) create mode
> > > > > > 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
> > > > > > arch/arm/dts/imx8mm-evk.dts create mode 100644
> > > > > > arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> > > > > > arch/arm/dts/imx8mm.dtsi create mode 100644
> > > > > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
> > > > > > arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> > > > > > arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> > > > > > arch/arm/dts/imx8mn.dtsi create mode 100644
> > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode
> > > 100644
> > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode
> > > 100644
> > > > > > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode
> > > 100644
> > > > > > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode
> > > 100644
> > > > > > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > > > > > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%)
> > > > > > create
> > > > > mode
> > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > > create
> > > > > mode
> > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create
> > > mode
> > > > > > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
> > > > > > board/freescale/imx8mm_evk/Kconfig create mode 100644
> > > > > > board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
> > > > > > board/freescale/imx8mm_evk/Makefile create mode 100644
> > > > > > board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
> > > > > > board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
> > > > > > board/freescale/imx8mm_evk/spl.c create mode 100644
> > > > > > board/freescale/imx8mn_evk/Kconfig create mode 100644
> > > > > > board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
> > > > > > board/freescale/imx8mn_evk/Makefile create mode 100644
> > > > > > board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
> > > > > > board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
> > > > > > board/freescale/imx8mn_evk/spl.c create mode 100644
> > > > > > configs/imx8mm_evk_defconfig create mode 100644
> > > > > > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > > > > > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > > > > > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > > > > > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > > > > > include/configs/imx8mm_evk.h create mode 100644
> > > > > > include/configs/imx8mn_evk.h create mode 100644
> > > > > > include/dt-bindings/clock/imx8mm-clock.h create mode 100644
> > > > > > include/dt-bindings/clock/imx8mn-clock.h
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Lukasz Majewski
> > > > >
> > > > > --
> > > > >
> > > > > DENX Software Engineering GmbH,      Managing Director:
> Wolfgang
> > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > > (+49)-8142-66989-80 Email: lukma@denx.de
> > >
> > >
> > >
> > >
> > > Best regards,
> > >
> > > Lukasz Majewski
> > >
> > > --
> > >
> > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > > lukma@denx.de
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de
Lukasz Majewski July 18, 2019, 7:12 a.m. UTC | #10
Hi Peng,

> Hi Lukasz, Stefano,
> 
> > > >  
> > > > > > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N  
> [....]
> > > >
> > > > The v5 of CCF has been posted ~2 weeks ago (with you on CC)
> > > > with a high chance to be pulled by Stefano after the merge
> > > > window opens.
> > > >
> > > > When we accept the "legacy" clock approach we will stuck with
> > > > it for a long time.
> > > >
> > > > What approach is took by the Linux kernel? CCF or any other
> > > > one?  
> > >
> > > I am not against CCF. I tried CCF and enabled on i.MX8MM in my
> > > last patchset. But I have to add lots of code based on your
> > > version, that introduces complexity for now.  
> > 
> > You will have to add this complexity anyway after people start
> > demanding new clocks for IPs which they need to enable.
> > 
> > Moreover, the CCF v5 was posted 2 weeks ago - wasn't it enough time
> > for applying your patches from v4?  
> 
> I have converted back to CCF for i.MX8MM/N. Pushed code
> to https://github.com/MrVan/u-boot/commits/imx8mmn-ccf
> 
> Since there are 65 patches in my patchset, I not post to maillist.
> 
> Please see whether you have some general comments or not.

I will try to provide some comments today. Thanks for the conversion.

> Then I'll post out to mail list. Hope it could catch this release
> cycle.

Let's be optimistic.

> 
> Thanks,
> Peng.
> 
> >   
> > >  
> > > >  
> > > > > We might try to switch to CCF again in future,  
> > > >
> > > > I'm a bit skeptical about such statements. It never works like
> > > > that
> > > > - after it is accepted it would become a "legacy code which we
> > > > do need to preserve".  
> > > > > but we hope
> > > > > i.MX8MM/N support could land in upstream soon. It has been
> > > > > pending for months.  
> > > >
> > > > Was the CCF the reason for the i.MX8 not being pulled for so
> > > > long?  
> > >
> > > I am not saying so.
> > >
> > > The first version to support i.MX8MM is in 2019-01-28. Then I
> > > switch to CCF and posted out new version in 2019-4-30.  
> > 
> > Maybe the version posted in 2019-01-28 was just not ready for being
> > pulled?
> > 
> > It happens that the community wants to avoid problems encountered
> > earlier with other SoCs (like i.MX6, i.MX7), so the discussion
> > takes time.
> > 
> > (The similar situation is with other projects too - how many
> > release cycles it takes to add new SoC in Linux? Or new port to
> > glibc?). 
> > > we have many 3rd parties want to use mainline U-Boot, not our
> > > vendor tree.  
> > 
> > There must be a reason that they want the U-Boot mainline. IMHO the
> > main reason for it is that people not only from a single company
> > want to add the code, so they need to discuss (and get the
> > agreement) to avoid stepping in each other's toes.
> > 
> > And the discussion/tests takes time ...
> >   
> > > I hope
> > > i.MX8MM/N could land in the coming merge window,  
> > 
> > This depends solely on the code quality I think.
> >   
> > > introducing more to CCF add risk.  
> > 
> > Risk for not being accepted?
> > 
> > I do see however other risk - the i.MX8 will gain one-off clock
> > support code instead of adopting the CCF just from the outset.
> > 
> >   
> > >
> > > Thanks,
> > > Peng.
> > >  
> > > >  
> > > > >
> > > > > Regards,
> > > > > Peng.
> > > > >  
> > > > > >  
> > > > > > >
> > > > > > > Bai Ping (1):
> > > > > > >   imx8mq: Update the ddrc QoS setting for B1 chip
> > > > > > >
> > > > > > > Jacky Bai (2):
> > > > > > >   driver: ddr: Refine the ddr init driver on imx8m
> > > > > > >   ddr: imx8m: Fix the ddr init hang on imx8mq
> > > > > > >
> > > > > > > Peng Fan (47):
> > > > > > >   linux: compat: guard PAGE_SIZE
> > > > > > >   dm: clk: ignore default settings when node not valid
> > > > > > >   pinctrl: imx: use devfdt_get_addr_size_index
> > > > > > >   i2c: mxc: add CONFIG_CLK support
> > > > > > >   tools: imx8m_image: align spl bin image size
> > > > > > >   ddr: imx8m: fix ddr firmware location when enable SPL OF
> > > > > > >   tools: imx8mimage: fix HDMI/FIT parsing
> > > > > > >   imx8m: add image cfg for i.MX8MM lpddr4
> > > > > > >   imx: add IMX8MQ kconfig entry
> > > > > > >   imx: add IMX8MM kconfig entry
> > > > > > >   imx: imx8mm: add clock bindings header
> > > > > > >   imx: add i.MX8MM cpu type
> > > > > > >   imx: spl: add spl_board_boot_device for i.MX8MM
> > > > > > >   imx8m: update imx-regs for i.MX8MM
> > > > > > >   imx: add get_cpu_rev support for i.MX8MM
> > > > > > >   imx8m: rename clock to clock_imx8mq
> > > > > > >   imx8m: restructure clock.h
> > > > > > >   imx8m: add clk support for i.MX8MM
> > > > > > >   imx8m: soc: probe clk before relocation
> > > > > > >   imx8m: add pin header for i.MX8MM
> > > > > > >   imx: add i.MX8MM PE property
> > > > > > >   imx8m: Fix MMU table issue for OPTEE memory
> > > > > > >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > > >   imx8m: soc: enable SCTR clock before timer init
> > > > > > >   serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
> > > > > > >   clk: imx: add Kconfig entry for i.MX8MM
> > > > > > >   clk: imx: add i.MX8MM clk driver
> > > > > > >   imx: add i.MX8MM EVK board support
> > > > > > >   imx: add i.MX8MN kconfig entry
> > > > > > >   imx8mn: support get_cpu_rev
> > > > > > >   imx8m: add clk support for i.MX8MN
> > > > > > >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > > >   imx: add i.MX8MN PE property
> > > > > > >   imx8mn: add pin header
> > > > > > >   imx: spl: use spl_board_boot_device for i.MX8MN
> > > > > > >   spl: pass args to board_return_to_bootrom
> > > > > > >   imx: add rom api support
> > > > > > >   imx: cpu: restrict get_boot_device
> > > > > > >   imx8mn: add get_boot_device
> > > > > > >   power: pmic: add SPL_DM_PMIC
> > > > > > >   tools: imx8mimage: add ROM VERSION
> > > > > > >   pinctrl: imx8m: support i.MX8MN
> > > > > > >   tools: imx8m_image: support ddr4 firmware
> > > > > > >   clk: imx: add i.MX8MN clk support
> > > > > > >   imx8m: add i.MX8MN ddr4 image cfg file
> > > > > > >   imx: add dtsi for i.MX8MN
> > > > > > >   imx: add i.MX8MN DDR4 board support
> > > > > > >
> > > > > > > Ye Li (2):
> > > > > > >   imx8m: Configure trustzone region 0 for non-secure
> > > > > > > access ddr: imx8m: Fix ddr4 driver build issue
> > > > > > >
> > > > > > >  arch/arm/dts/Makefile                              |  
> > 4  
> > > > +-  
> > > > > > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |
> > > > > > > 92  
> > +  
> > > > > > >  arch/arm/dts/imx8mm-evk.dts                        |  
> > 235  
> > > > +++  
> > > > > > >  arch/arm/dts/imx8mm-pinfunc.h                      |  
> > 629  
> > > > > > +++++++  
> > > > > > >  arch/arm/dts/imx8mm.dtsi                           |  
> > 733  
> > > > > > ++++++++  
> > > > > > >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |
> > > > > > > 92 + arch/arm/dts/imx8mn-ddr4-evk.dts
> > > > > > > |  
> > 221  
> > > > +++  
> > > > > > >  arch/arm/dts/imx8mn-pinfunc.h                      |  
> > 646  
> > > > > > +++++++  
> > > > > > >  arch/arm/dts/imx8mn.dtsi                           |  
> > 712  
> > > > > > +++++++  
> > > > > > >  arch/arm/include/asm/arch-imx/cpu.h                |
> > > > > > > 7  
> > +  
> > > > > > >  arch/arm/include/asm/arch-imx8m/clock.h            |
> > > > > > > 494  
> > > > +----  
> > > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |  
> > 465  
> > > > > > +++++  
> > > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |
> > > > > > > 424  
> > > > +++++  
> > > > > > >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |
> > > > > > > 75  
> > +-  
> > > > > > >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |  
> > 691  
> > > > > > +++++++  
> > > > > > >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |
> > > > > > > 763  
> > > > > > ++++++++  
> > > > > > >  arch/arm/include/asm/mach-imx/iomux-v3.h           |  
> > 4 +  
> > > > > > >  arch/arm/include/asm/mach-imx/mxc_i2c.h            |  
> > 2 +  
> > > > > > >  arch/arm/include/asm/mach-imx/sys_proto.h          |
> > > > > > > 42  
> > +  
> > > > > > >  arch/arm/mach-imx/Kconfig                          |  
> > 4 +  
> > > > > > >  arch/arm/mach-imx/Makefile                         |  
> > 2 +  
> > > > > > >  arch/arm/mach-imx/cpu.c                            |  
> > 16  
> > > > +-  
> > > > > > >  arch/arm/mach-imx/imx8m/Kconfig                    |  
> > 28  
> > > > +-  
> > > > > > >  arch/arm/mach-imx/imx8m/Makefile                   |  
> > 4  
> > > > +-  
> > > > > > >  arch/arm/mach-imx/imx8m/clock_imx8mm.c             |  
> > 707  
> > > > > > +++++++  
> > > > > > >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |
> > > > > > > 7 +- arch/arm/mach-imx/imx8m/clock_slice.c
> > > > > > > |  815  
> > > > > > ++++++++  
> > > > > > >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |  
> > 16 +  
> > > > > > >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |  
> > 17 +  
> > > > > > >  arch/arm/mach-imx/imx8m/soc.c                      |  
> > 162  
> > > > +-  
> > > > > > >  arch/arm/mach-imx/spl.c                            |  
> > 8 +  
> > > > > > >  arch/arm/mach-imx/spl_imx_romapi.c                 |  
> > 292  
> > > > +++  
> > > > > > >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |
> > > > > > > 5  
> > +-  
> > > > > > >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |
> > > > > > > 5  
> > +-  
> > > > > > >  arch/arm/mach-rockchip/rk3399-board-spl.c          |
> > > > > > > 5  
> > +-  
> > > > > > >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |
> > > > > > > 5  
> > +-  
> > > > > > >  board/freescale/imx8mm_evk/Kconfig                 |
> > > > > > > 12  
> > +  
> > > > > > >  board/freescale/imx8mm_evk/MAINTAINERS             |  
> > 6  
> > > > +  
> > > > > > >  board/freescale/imx8mm_evk/Makefile                |  
> > 12 +  
> > > > > > >  board/freescale/imx8mm_evk/imx8mm_evk.c            |  
> > 90  
> > > > +  
> > > > > > >  board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> > > > > > > ++++++++++++++++++++
> > > > > > > board/freescale/imx8mm_evk/spl.c                   |
> > > > > > > 216  
> > +++  
> > > > > > > board/freescale/imx8mn_evk/Kconfig                 |   14
> > > > > > > + board/freescale/imx8mn_evk/MAINTAINERS             |
> > > > > > > 6  
> > +  
> > > > > > > board/freescale/imx8mn_evk/Makefile                |   12
> > > > > > > + board/freescale/imx8mn_evk/ddr4_timing.c           |
> > > > > > > 1214 ++++++++++++
> > > > > > > board/freescale/imx8mn_evk/imx8mn_evk.c  
> > > > > > |  
> > > > > > > 85 + board/freescale/imx8mn_evk/spl.c                   |
> > > > > > > 91  
> > > > +  
> > > > > > > board/freescale/imx8mq_evk/lpddr4_timing.c         |   16
> > > > > > > +- common/spl/spl_bootrom.c
> > > > > > > |    7  
> > +-  
> > > > > > > configs/imx8mm_evk_defconfig                       |
> > > > > > > 51  
> > +  
> > > > > > > configs/imx8mn_ddr4_evk_defconfig                  |   55
> > > > > > > + drivers/clk/clk-uclass.c                           |
> > > > > > > 3 + drivers/clk/imx/Kconfig
> > > > > > > |   14 +
> > > > > > > drivers/clk/imx/Makefile                           |    1
> > > > > > > + drivers/clk/imx/clk-imx8mm.c                       |
> > > > > > > 121  
> > ++  
> > > > > > > drivers/ddr/imx/imx8m/Kconfig                      |    6
> > > > > > > + drivers/ddr/imx/imx8m/Makefile                     |
> > > > > > > 4  
> > +-  
> > > > > > > drivers/ddr/imx/imx8m/ddr4_init.c                  |  113
> > > > > > > -- drivers/ddr/imx/imx8m/ddr_init.c                   |
> > > > > > > 168 ++ drivers/ddr/imx/imx8m/ddrphy_utils.c
> > > > > > > |    4 +
> > > > > > > drivers/ddr/imx/imx8m/helper.c                     |   22
> > > > > > > +- drivers/ddr/imx/imx8m/lpddr4_init.c                |
> > > > > > > 188 -- drivers/i2c/mxc_i2c.c
> > > > > > > |   24  
> > +-  
> > > > > > > drivers/pinctrl/nxp/pinctrl-imx.c                  |    4
> > > > > > > +- drivers/pinctrl/nxp/pinctrl-imx8m.c
> > > > > > > |    1 +
> > > > > > > drivers/power/pmic/Kconfig                         |   12
> > > > > > > + drivers/power/pmic/Makefile                        |
> > > > > > > 2  
> > +-  
> > > > > > > drivers/serial/Kconfig                             |    2
> > > > > > > +- include/configs/imx8mm_evk.h                       |
> > > > > > > 200  
> > ++  
> > > > > > > include/configs/imx8mn_evk.h                       |
> > > > > > > 198  
> > ++  
> > > > > > > include/dt-bindings/clock/imx8mm-clock.h           |  244
> > > > > > > +++ include/dt-bindings/clock/imx8mn-clock.h           |
> > > > > > > 215 +++
> > > > > > > include/imximage.h                                 |
> > > > > > > 1  
> > +  
> > > > > > > include/linux/compat.h                             |    2
> > > > > > > + include/power/pmic.h                               |
> > > > > > > 2  
> > +-  
> > > > > > > include/spl.h                                      |
> > > > > > > 3  
> > +-  
> > > > > > > tools/imx8m_image.sh                               |  
> > 15 +-  
> > > > > > > tools/imx8mimage.c                                 |  
> > 31 +-  
> > > > 79  
> > > > > > files  
> > > > > > > changed, 13082 insertions(+), 814 deletions(-) create mode
> > > > > > > 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode
> > > > > > > 100644 arch/arm/dts/imx8mm-evk.dts create mode 100644
> > > > > > > arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> > > > > > > arch/arm/dts/imx8mm.dtsi create mode 100644
> > > > > > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode
> > > > > > > 100644 arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> > > > > > > arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> > > > > > > arch/arm/dts/imx8mn.dtsi create mode 100644
> > > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create
> > > > > > > mode  
> > > > 100644  
> > > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create
> > > > > > > mode  
> > > > 100644  
> > > > > > > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create
> > > > > > > mode  
> > > > 100644  
> > > > > > > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create
> > > > > > > mode  
> > > > 100644  
> > > > > > > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > > > > > > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%)
> > > > > > > create  
> > > > > > mode  
> > > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > > > create  
> > > > > > mode  
> > > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg
> > > > > > > create  
> > > > mode  
> > > > > > > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode
> > > > > > > 100644 board/freescale/imx8mm_evk/Kconfig create mode
> > > > > > > 100644 board/freescale/imx8mm_evk/MAINTAINERS create mode
> > > > > > > 100644 board/freescale/imx8mm_evk/Makefile create mode
> > > > > > > 100644 board/freescale/imx8mm_evk/imx8mm_evk.c create
> > > > > > > mode 100644 board/freescale/imx8mm_evk/lpddr4_timing.c
> > > > > > > create mode 100644 board/freescale/imx8mm_evk/spl.c
> > > > > > > create mode 100644 board/freescale/imx8mn_evk/Kconfig
> > > > > > > create mode 100644 board/freescale/imx8mn_evk/MAINTAINERS
> > > > > > > create mode 100644 board/freescale/imx8mn_evk/Makefile
> > > > > > > create mode 100644
> > > > > > > board/freescale/imx8mn_evk/ddr4_timing.c create mode
> > > > > > > 100644 board/freescale/imx8mn_evk/imx8mn_evk.c create
> > > > > > > mode 100644 board/freescale/imx8mn_evk/spl.c create mode
> > > > > > > 100644 configs/imx8mm_evk_defconfig create mode 100644
> > > > > > > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > > > > > > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > > > > > > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > > > > > > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > > > > > > include/configs/imx8mm_evk.h create mode 100644
> > > > > > > include/configs/imx8mn_evk.h create mode 100644
> > > > > > > include/dt-bindings/clock/imx8mm-clock.h create mode
> > > > > > > 100644 include/dt-bindings/clock/imx8mn-clock.h 
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Best regards,
> > > > > >
> > > > > > Lukasz Majewski
> > > > > >
> > > > > > --
> > > > > >
> > > > > > DENX Software Engineering GmbH,      Managing Director:  
> > Wolfgang  
> > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > > > (+49)-8142-66989-80 Email: lukma@denx.de  
> > > >
> > > >
> > > >
> > > >
> > > > Best regards,
> > > >
> > > > Lukasz Majewski
> > > >
> > > > --
> > > >
> > > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > (+49)-8142-66989-80 Email: lukma@denx.de  
> > 
> > 
> > 
> > 
> > Best regards,
> > 
> > Lukasz Majewski
> > 
> > --
> > 
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > lukma@denx.de  




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Frieder Schrempf July 18, 2019, 2:34 p.m. UTC | #11
Hi Peng,

On 17.07.19 10:37, Peng Fan wrote:
> Hi Lukasz, Stefano,
> 
>>>>
>>>>>> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> [....]
>>>>
>>>> The v5 of CCF has been posted ~2 weeks ago (with you on CC) with a
>>>> high chance to be pulled by Stefano after the merge window opens.
>>>>
>>>> When we accept the "legacy" clock approach we will stuck with it for
>>>> a long time.
>>>>
>>>> What approach is took by the Linux kernel? CCF or any other one?
>>>
>>> I am not against CCF. I tried CCF and enabled on i.MX8MM in my last
>>> patchset. But I have to add lots of code based on your version, that
>>> introduces complexity for now.
>>
>> You will have to add this complexity anyway after people start demanding
>> new clocks for IPs which they need to enable.
>>
>> Moreover, the CCF v5 was posted 2 weeks ago - wasn't it enough time for
>> applying your patches from v4?
> 
> I have converted back to CCF for i.MX8MM/N. Pushed code
> to https://github.com/MrVan/u-boot/commits/imx8mmn-ccf
> 
> Since there are 65 patches in my patchset, I not post to maillist.

A patchset with 65 patches is very difficult to handle (also for 
yourself) and you are mixing all kind of things into it.

IMHO it would be a very good idea to split this patchset into smaller 
pieces and test/review/merge them separately. I guess this would also 
increase the chance that me and other developers join to test and review 
this.

What about some split like this?
* Generic clock changes on top of Lukasz's CCF patches
* Generic Driver changes (pinctrl, i2c, pll14xx, ...)
* Support and changes for i.MX8MM
* Support and changes for i.MX8MN
* Changes/Fixes for i.MX8M/i.MX8MQ

Thanks,
Frieder

> 
> Please see whether you have some general comments or not.
> Then I'll post out to mail list. Hope it could catch this release cycle.
> 
> Thanks,
> Peng.
> 
>>
>>>
>>>>
>>>>> We might try to switch to CCF again in future,
>>>>
>>>> I'm a bit skeptical about such statements. It never works like that
>>>> - after it is accepted it would become a "legacy code which we do
>>>> need to preserve".
>>>>> but we hope
>>>>> i.MX8MM/N support could land in upstream soon. It has been pending
>>>>> for months.
>>>>
>>>> Was the CCF the reason for the i.MX8 not being pulled for so long?
>>>
>>> I am not saying so.
>>>
>>> The first version to support i.MX8MM is in 2019-01-28. Then I switch
>>> to CCF and posted out new version in 2019-4-30.
>>
>> Maybe the version posted in 2019-01-28 was just not ready for being pulled?
>>
>> It happens that the community wants to avoid problems encountered earlier
>> with other SoCs (like i.MX6, i.MX7), so the discussion takes time.
>>
>> (The similar situation is with other projects too - how many release cycles it
>> takes to add new SoC in Linux? Or new port to glibc?).
>>
>>> we have many 3rd parties want to use mainline U-Boot, not our vendor
>>> tree.
>>
>> There must be a reason that they want the U-Boot mainline. IMHO the main
>> reason for it is that people not only from a single company want to add the
>> code, so they need to discuss (and get the agreement) to avoid stepping in
>> each other's toes.
>>
>> And the discussion/tests takes time ...
>>
>>> I hope
>>> i.MX8MM/N could land in the coming merge window,
>>
>> This depends solely on the code quality I think.
>>
>>> introducing more to CCF add risk.
>>
>> Risk for not being accepted?
>>
>> I do see however other risk - the i.MX8 will gain one-off clock support code
>> instead of adopting the CCF just from the outset.
>>
>>
>>>
>>> Thanks,
>>> Peng.
>>>
>>>>
>>>>>
>>>>> Regards,
>>>>> Peng.
>>>>>
>>>>>>
>>>>>>>
>>>>>>> Bai Ping (1):
>>>>>>>    imx8mq: Update the ddrc QoS setting for B1 chip
>>>>>>>
>>>>>>> Jacky Bai (2):
>>>>>>>    driver: ddr: Refine the ddr init driver on imx8m
>>>>>>>    ddr: imx8m: Fix the ddr init hang on imx8mq
>>>>>>>
>>>>>>> Peng Fan (47):
>>>>>>>    linux: compat: guard PAGE_SIZE
>>>>>>>    dm: clk: ignore default settings when node not valid
>>>>>>>    pinctrl: imx: use devfdt_get_addr_size_index
>>>>>>>    i2c: mxc: add CONFIG_CLK support
>>>>>>>    tools: imx8m_image: align spl bin image size
>>>>>>>    ddr: imx8m: fix ddr firmware location when enable SPL OF
>>>>>>>    tools: imx8mimage: fix HDMI/FIT parsing
>>>>>>>    imx8m: add image cfg for i.MX8MM lpddr4
>>>>>>>    imx: add IMX8MQ kconfig entry
>>>>>>>    imx: add IMX8MM kconfig entry
>>>>>>>    imx: imx8mm: add clock bindings header
>>>>>>>    imx: add i.MX8MM cpu type
>>>>>>>    imx: spl: add spl_board_boot_device for i.MX8MM
>>>>>>>    imx8m: update imx-regs for i.MX8MM
>>>>>>>    imx: add get_cpu_rev support for i.MX8MM
>>>>>>>    imx8m: rename clock to clock_imx8mq
>>>>>>>    imx8m: restructure clock.h
>>>>>>>    imx8m: add clk support for i.MX8MM
>>>>>>>    imx8m: soc: probe clk before relocation
>>>>>>>    imx8m: add pin header for i.MX8MM
>>>>>>>    imx: add i.MX8MM PE property
>>>>>>>    imx8m: Fix MMU table issue for OPTEE memory
>>>>>>>    imx8m: set BYPASS ID SWAP to avoid AXI bus errors
>>>>>>>    imx8m: soc: enable SCTR clock before timer init
>>>>>>>    serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
>>>>>>>    clk: imx: add Kconfig entry for i.MX8MM
>>>>>>>    clk: imx: add i.MX8MM clk driver
>>>>>>>    imx: add i.MX8MM EVK board support
>>>>>>>    imx: add i.MX8MN kconfig entry
>>>>>>>    imx8mn: support get_cpu_rev
>>>>>>>    imx8m: add clk support for i.MX8MN
>>>>>>>    imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
>>>>>>>    imx: add i.MX8MN PE property
>>>>>>>    imx8mn: add pin header
>>>>>>>    imx: spl: use spl_board_boot_device for i.MX8MN
>>>>>>>    spl: pass args to board_return_to_bootrom
>>>>>>>    imx: add rom api support
>>>>>>>    imx: cpu: restrict get_boot_device
>>>>>>>    imx8mn: add get_boot_device
>>>>>>>    power: pmic: add SPL_DM_PMIC
>>>>>>>    tools: imx8mimage: add ROM VERSION
>>>>>>>    pinctrl: imx8m: support i.MX8MN
>>>>>>>    tools: imx8m_image: support ddr4 firmware
>>>>>>>    clk: imx: add i.MX8MN clk support
>>>>>>>    imx8m: add i.MX8MN ddr4 image cfg file
>>>>>>>    imx: add dtsi for i.MX8MN
>>>>>>>    imx: add i.MX8MN DDR4 board support
>>>>>>>
>>>>>>> Ye Li (2):
>>>>>>>    imx8m: Configure trustzone region 0 for non-secure access
>>>>>>>    ddr: imx8m: Fix ddr4 driver build issue
>>>>>>>
>>>>>>>   arch/arm/dts/Makefile                              |
>> 4
>>>> +-
>>>>>>>   arch/arm/dts/imx8mm-evk-u-boot.dtsi                |   92
>> +
>>>>>>>   arch/arm/dts/imx8mm-evk.dts                        |
>> 235
>>>> +++
>>>>>>>   arch/arm/dts/imx8mm-pinfunc.h                      |
>> 629
>>>>>> +++++++
>>>>>>>   arch/arm/dts/imx8mm.dtsi                           |
>> 733
>>>>>> ++++++++
>>>>>>>   arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92 +
>>>>>>>   arch/arm/dts/imx8mn-ddr4-evk.dts                   |
>> 221
>>>> +++
>>>>>>>   arch/arm/dts/imx8mn-pinfunc.h                      |
>> 646
>>>>>> +++++++
>>>>>>>   arch/arm/dts/imx8mn.dtsi                           |
>> 712
>>>>>> +++++++
>>>>>>>   arch/arm/include/asm/arch-imx/cpu.h                |    7
>> +
>>>>>>>   arch/arm/include/asm/arch-imx8m/clock.h            |  494
>>>> +----
>>>>>>>   arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |
>> 465
>>>>>> +++++
>>>>>>>   arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |  424
>>>> +++++
>>>>>>>   arch/arm/include/asm/arch-imx8m/imx-regs.h         |   75
>> +-
>>>>>>>   arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |
>> 691
>>>>>> +++++++
>>>>>>>   arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |  763
>>>>>> ++++++++
>>>>>>>   arch/arm/include/asm/mach-imx/iomux-v3.h           |
>> 4 +
>>>>>>>   arch/arm/include/asm/mach-imx/mxc_i2c.h            |
>> 2 +
>>>>>>>   arch/arm/include/asm/mach-imx/sys_proto.h          |   42
>> +
>>>>>>>   arch/arm/mach-imx/Kconfig                          |
>> 4 +
>>>>>>>   arch/arm/mach-imx/Makefile                         |
>> 2 +
>>>>>>>   arch/arm/mach-imx/cpu.c                            |
>> 16
>>>> +-
>>>>>>>   arch/arm/mach-imx/imx8m/Kconfig                    |
>> 28
>>>> +-
>>>>>>>   arch/arm/mach-imx/imx8m/Makefile                   |
>> 4
>>>> +-
>>>>>>>   arch/arm/mach-imx/imx8m/clock_imx8mm.c             |
>> 707
>>>>>> +++++++
>>>>>>>   .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7 +-
>>>>>>>   arch/arm/mach-imx/imx8m/clock_slice.c              |  815
>>>>>> ++++++++
>>>>>>>   arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |
>> 16 +
>>>>>>>   arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |
>> 17 +
>>>>>>>   arch/arm/mach-imx/imx8m/soc.c                      |
>> 162
>>>> +-
>>>>>>>   arch/arm/mach-imx/spl.c                            |
>> 8 +
>>>>>>>   arch/arm/mach-imx/spl_imx_romapi.c                 |
>> 292
>>>> +++
>>>>>>>   arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5
>> +-
>>>>>>>   arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5
>> +-
>>>>>>>   arch/arm/mach-rockchip/rk3399-board-spl.c          |    5
>> +-
>>>>>>>   arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5
>> +-
>>>>>>>   board/freescale/imx8mm_evk/Kconfig                 |   12
>> +
>>>>>>>   board/freescale/imx8mm_evk/MAINTAINERS             |
>> 6
>>>> +
>>>>>>>   board/freescale/imx8mm_evk/Makefile                |
>> 12 +
>>>>>>>   board/freescale/imx8mm_evk/imx8mm_evk.c            |
>> 90
>>>> +
>>>>>>>   board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
>>>>>>> ++++++++++++++++++++
>>>>>>> board/freescale/imx8mm_evk/spl.c                   |  216
>> +++
>>>>>>> board/freescale/imx8mn_evk/Kconfig                 |   14 +
>>>>>>> board/freescale/imx8mn_evk/MAINTAINERS             |    6
>> +
>>>>>>> board/freescale/imx8mn_evk/Makefile                |   12 +
>>>>>>> board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
>>>>>>> ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c
>>>>>> |
>>>>>>> 85 + board/freescale/imx8mn_evk/spl.c                   |
>>>>>>> 91
>>>> +
>>>>>>> board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
>>>>>>> common/spl/spl_bootrom.c                           |    7
>> +-
>>>>>>> configs/imx8mm_evk_defconfig                       |   51
>> +
>>>>>>> configs/imx8mn_ddr4_evk_defconfig                  |   55 +
>>>>>>> drivers/clk/clk-uclass.c                           |    3 +
>>>>>>> drivers/clk/imx/Kconfig                            |   14 +
>>>>>>> drivers/clk/imx/Makefile                           |    1 +
>>>>>>> drivers/clk/imx/clk-imx8mm.c                       |  121
>> ++
>>>>>>> drivers/ddr/imx/imx8m/Kconfig                      |    6 +
>>>>>>> drivers/ddr/imx/imx8m/Makefile                     |    4
>> +-
>>>>>>> drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
>>>>>>> drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
>>>>>>> drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
>>>>>>> drivers/ddr/imx/imx8m/helper.c                     |   22 +-
>>>>>>> drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
>>>>>>> drivers/i2c/mxc_i2c.c                              |   24
>> +-
>>>>>>> drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
>>>>>>> drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
>>>>>>> drivers/power/pmic/Kconfig                         |   12 +
>>>>>>> drivers/power/pmic/Makefile                        |    2
>> +-
>>>>>>> drivers/serial/Kconfig                             |    2 +-
>>>>>>> include/configs/imx8mm_evk.h                       |  200
>> ++
>>>>>>> include/configs/imx8mn_evk.h                       |  198
>> ++
>>>>>>> include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
>>>>>>> include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
>>>>>>> include/imximage.h                                 |    1
>> +
>>>>>>> include/linux/compat.h                             |    2 +
>>>>>>> include/power/pmic.h                               |    2
>> +-
>>>>>>> include/spl.h                                      |    3
>> +-
>>>>>>> tools/imx8m_image.sh                               |
>> 15 +-
>>>>>>> tools/imx8mimage.c                                 |
>> 31 +-
>>>> 79
>>>>>> files
>>>>>>> changed, 13082 insertions(+), 814 deletions(-) create mode
>>>>>>> 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
>>>>>>> arch/arm/dts/imx8mm-evk.dts create mode 100644
>>>>>>> arch/arm/dts/imx8mm-pinfunc.h create mode 100644
>>>>>>> arch/arm/dts/imx8mm.dtsi create mode 100644
>>>>>>> arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
>>>>>>> arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
>>>>>>> arch/arm/dts/imx8mn-pinfunc.h create mode 100644
>>>>>>> arch/arm/dts/imx8mn.dtsi create mode 100644
>>>>>>> arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode
>>>> 100644
>>>>>>> arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode
>>>> 100644
>>>>>>> arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode
>>>> 100644
>>>>>>> arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode
>>>> 100644
>>>>>>> arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
>>>>>>> arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%)
>>>>>>> create
>>>>>> mode
>>>>>>> 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
>>>>>>> create
>>>>>> mode
>>>>>>> 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create
>>>> mode
>>>>>>> 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
>>>>>>> board/freescale/imx8mm_evk/Kconfig create mode 100644
>>>>>>> board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
>>>>>>> board/freescale/imx8mm_evk/Makefile create mode 100644
>>>>>>> board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
>>>>>>> board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
>>>>>>> board/freescale/imx8mm_evk/spl.c create mode 100644
>>>>>>> board/freescale/imx8mn_evk/Kconfig create mode 100644
>>>>>>> board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
>>>>>>> board/freescale/imx8mn_evk/Makefile create mode 100644
>>>>>>> board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
>>>>>>> board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
>>>>>>> board/freescale/imx8mn_evk/spl.c create mode 100644
>>>>>>> configs/imx8mm_evk_defconfig create mode 100644
>>>>>>> configs/imx8mn_ddr4_evk_defconfig create mode 100644
>>>>>>> drivers/clk/imx/clk-imx8mm.c delete mode 100644
>>>>>>> drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
>>>>>>> drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
>>>>>>> drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
>>>>>>> include/configs/imx8mm_evk.h create mode 100644
>>>>>>> include/configs/imx8mn_evk.h create mode 100644
>>>>>>> include/dt-bindings/clock/imx8mm-clock.h create mode 100644
>>>>>>> include/dt-bindings/clock/imx8mn-clock.h
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>> Lukasz Majewski
>>>>>>
>>>>>> --
>>>>>>
>>>>>> DENX Software Engineering GmbH,      Managing Director:
>> Wolfgang
>>>>>> Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
>>>>>> Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
>>>>>> (+49)-8142-66989-80 Email: lukma@denx.de
>>>>
>>>>
>>>>
>>>>
>>>> Best regards,
>>>>
>>>> Lukasz Majewski
>>>>
>>>> --
>>>>
>>>> DENX Software Engineering GmbH,      Managing Director: Wolfgang
>>>> Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
>>>> Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
>>>> lukma@denx.de
>>
>>
>>
>>
>> Best regards,
>>
>> Lukasz Majewski
>>
>> --
>>
>> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
>> lukma@denx.de
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
Peng Fan July 19, 2019, 1:51 a.m. UTC | #12
Hi Schrempf,

> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> 
> Hi Peng,
> 
> On 17.07.19 10:37, Peng Fan wrote:
> > Hi Lukasz, Stefano,
> >
> >>>>
> >>>>>> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> > [....]
> >>>>
> >>>> The v5 of CCF has been posted ~2 weeks ago (with you on CC) with a
> >>>> high chance to be pulled by Stefano after the merge window opens.
> >>>>
> >>>> When we accept the "legacy" clock approach we will stuck with it
> >>>> for a long time.
> >>>>
> >>>> What approach is took by the Linux kernel? CCF or any other one?
> >>>
> >>> I am not against CCF. I tried CCF and enabled on i.MX8MM in my last
> >>> patchset. But I have to add lots of code based on your version, that
> >>> introduces complexity for now.
> >>
> >> You will have to add this complexity anyway after people start
> >> demanding new clocks for IPs which they need to enable.
> >>
> >> Moreover, the CCF v5 was posted 2 weeks ago - wasn't it enough time
> >> for applying your patches from v4?
> >
> > I have converted back to CCF for i.MX8MM/N. Pushed code to
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> >
> ub.com%2FMrVan%2Fu-boot%2Fcommits%2Fimx8mmn-ccf&amp;data=02%7
> C01%7Cpen
> >
> g.fan%40nxp.com%7Cd4953ef00c2f46b25a8c08d70b8cffa3%7C686ea1d3bc2
> b4c6fa
> >
> 92cd99c5c301635%7C0%7C0%7C636990572533686342&amp;sdata=FlV4rt7
> I%2BkjWe
> > SGa0WThT6mGMc3d6ree21azxqKi5zs%3D&amp;reserved=0
> >
> > Since there are 65 patches in my patchset, I not post to maillist.
> 
> A patchset with 65 patches is very difficult to handle (also for
> yourself) and you are mixing all kind of things into it.
> 
> IMHO it would be a very good idea to split this patchset into smaller pieces
> and test/review/merge them separately. I guess this would also increase the
> chance that me and other developers join to test and review this.
> 
> What about some split like this?
> * Generic clock changes on top of Lukasz's CCF patches
> * Generic Driver changes (pinctrl, i2c, pll14xx, ...)
> * Support and changes for i.MX8MM
> * Support and changes for i.MX8MN
> * Changes/Fixes for i.MX8M/i.MX8MQ

I could try to split.

Thanks,
Peng.

> 
> Thanks,
> Frieder
> 
> >
> > Please see whether you have some general comments or not.
> > Then I'll post out to mail list. Hope it could catch this release cycle.
> >
> > Thanks,
> > Peng.
> >
> >>
> >>>
> >>>>
> >>>>> We might try to switch to CCF again in future,
> >>>>
> >>>> I'm a bit skeptical about such statements. It never works like that
> >>>> - after it is accepted it would become a "legacy code which we do
> >>>> need to preserve".
> >>>>> but we hope
> >>>>> i.MX8MM/N support could land in upstream soon. It has been pending
> >>>>> for months.
> >>>>
> >>>> Was the CCF the reason for the i.MX8 not being pulled for so long?
> >>>
> >>> I am not saying so.
> >>>
> >>> The first version to support i.MX8MM is in 2019-01-28. Then I switch
> >>> to CCF and posted out new version in 2019-4-30.
> >>
> >> Maybe the version posted in 2019-01-28 was just not ready for being
> pulled?
> >>
> >> It happens that the community wants to avoid problems encountered
> >> earlier with other SoCs (like i.MX6, i.MX7), so the discussion takes time.
> >>
> >> (The similar situation is with other projects too - how many release
> >> cycles it takes to add new SoC in Linux? Or new port to glibc?).
> >>
> >>> we have many 3rd parties want to use mainline U-Boot, not our vendor
> >>> tree.
> >>
> >> There must be a reason that they want the U-Boot mainline. IMHO the
> >> main reason for it is that people not only from a single company want
> >> to add the code, so they need to discuss (and get the agreement) to
> >> avoid stepping in each other's toes.
> >>
> >> And the discussion/tests takes time ...
> >>
> >>> I hope
> >>> i.MX8MM/N could land in the coming merge window,
> >>
> >> This depends solely on the code quality I think.
> >>
> >>> introducing more to CCF add risk.
> >>
> >> Risk for not being accepted?
> >>
> >> I do see however other risk - the i.MX8 will gain one-off clock
> >> support code instead of adopting the CCF just from the outset.
> >>
> >>
> >>>
> >>> Thanks,
> >>> Peng.
> >>>
> >>>>
> >>>>>
> >>>>> Regards,
> >>>>> Peng.
> >>>>>
> >>>>>>
> >>>>>>>
> >>>>>>> Bai Ping (1):
> >>>>>>>    imx8mq: Update the ddrc QoS setting for B1 chip
> >>>>>>>
> >>>>>>> Jacky Bai (2):
> >>>>>>>    driver: ddr: Refine the ddr init driver on imx8m
> >>>>>>>    ddr: imx8m: Fix the ddr init hang on imx8mq
> >>>>>>>
> >>>>>>> Peng Fan (47):
> >>>>>>>    linux: compat: guard PAGE_SIZE
> >>>>>>>    dm: clk: ignore default settings when node not valid
> >>>>>>>    pinctrl: imx: use devfdt_get_addr_size_index
> >>>>>>>    i2c: mxc: add CONFIG_CLK support
> >>>>>>>    tools: imx8m_image: align spl bin image size
> >>>>>>>    ddr: imx8m: fix ddr firmware location when enable SPL OF
> >>>>>>>    tools: imx8mimage: fix HDMI/FIT parsing
> >>>>>>>    imx8m: add image cfg for i.MX8MM lpddr4
> >>>>>>>    imx: add IMX8MQ kconfig entry
> >>>>>>>    imx: add IMX8MM kconfig entry
> >>>>>>>    imx: imx8mm: add clock bindings header
> >>>>>>>    imx: add i.MX8MM cpu type
> >>>>>>>    imx: spl: add spl_board_boot_device for i.MX8MM
> >>>>>>>    imx8m: update imx-regs for i.MX8MM
> >>>>>>>    imx: add get_cpu_rev support for i.MX8MM
> >>>>>>>    imx8m: rename clock to clock_imx8mq
> >>>>>>>    imx8m: restructure clock.h
> >>>>>>>    imx8m: add clk support for i.MX8MM
> >>>>>>>    imx8m: soc: probe clk before relocation
> >>>>>>>    imx8m: add pin header for i.MX8MM
> >>>>>>>    imx: add i.MX8MM PE property
> >>>>>>>    imx8m: Fix MMU table issue for OPTEE memory
> >>>>>>>    imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> >>>>>>>    imx8m: soc: enable SCTR clock before timer init
> >>>>>>>    serial: Kconfig: make MXC_UART usable for MX7 and IMX8M
> >>>>>>>    clk: imx: add Kconfig entry for i.MX8MM
> >>>>>>>    clk: imx: add i.MX8MM clk driver
> >>>>>>>    imx: add i.MX8MM EVK board support
> >>>>>>>    imx: add i.MX8MN kconfig entry
> >>>>>>>    imx8mn: support get_cpu_rev
> >>>>>>>    imx8m: add clk support for i.MX8MN
> >>>>>>>    imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> >>>>>>>    imx: add i.MX8MN PE property
> >>>>>>>    imx8mn: add pin header
> >>>>>>>    imx: spl: use spl_board_boot_device for i.MX8MN
> >>>>>>>    spl: pass args to board_return_to_bootrom
> >>>>>>>    imx: add rom api support
> >>>>>>>    imx: cpu: restrict get_boot_device
> >>>>>>>    imx8mn: add get_boot_device
> >>>>>>>    power: pmic: add SPL_DM_PMIC
> >>>>>>>    tools: imx8mimage: add ROM VERSION
> >>>>>>>    pinctrl: imx8m: support i.MX8MN
> >>>>>>>    tools: imx8m_image: support ddr4 firmware
> >>>>>>>    clk: imx: add i.MX8MN clk support
> >>>>>>>    imx8m: add i.MX8MN ddr4 image cfg file
> >>>>>>>    imx: add dtsi for i.MX8MN
> >>>>>>>    imx: add i.MX8MN DDR4 board support
> >>>>>>>
> >>>>>>> Ye Li (2):
> >>>>>>>    imx8m: Configure trustzone region 0 for non-secure access
> >>>>>>>    ddr: imx8m: Fix ddr4 driver build issue
> >>>>>>>
> >>>>>>>   arch/arm/dts/Makefile                              |
> >> 4
> >>>> +-
> >>>>>>>   arch/arm/dts/imx8mm-evk-u-boot.dtsi                |
> 92
> >> +
> >>>>>>>   arch/arm/dts/imx8mm-evk.dts                        |
> >> 235
> >>>> +++
> >>>>>>>   arch/arm/dts/imx8mm-pinfunc.h                      |
> >> 629
> >>>>>> +++++++
> >>>>>>>   arch/arm/dts/imx8mm.dtsi                           |
> >> 733
> >>>>>> ++++++++
> >>>>>>>   arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |   92
> +
> >>>>>>>   arch/arm/dts/imx8mn-ddr4-evk.dts                   |
> >> 221
> >>>> +++
> >>>>>>>   arch/arm/dts/imx8mn-pinfunc.h                      |
> >> 646
> >>>>>> +++++++
> >>>>>>>   arch/arm/dts/imx8mn.dtsi                           |
> >> 712
> >>>>>> +++++++
> >>>>>>>   arch/arm/include/asm/arch-imx/cpu.h                |
> 7
> >> +
> >>>>>>>   arch/arm/include/asm/arch-imx8m/clock.h            |
> 494
> >>>> +----
> >>>>>>>   arch/arm/include/asm/arch-imx8m/clock_imx8mm.h     |
> >> 465
> >>>>>> +++++
> >>>>>>>   arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |
> 424
> >>>> +++++
> >>>>>>>   arch/arm/include/asm/arch-imx8m/imx-regs.h         |
> 75
> >> +-
> >>>>>>>   arch/arm/include/asm/arch-imx8m/imx8mm_pins.h      |
> >> 691
> >>>>>> +++++++
> >>>>>>>   arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |
> 763
> >>>>>> ++++++++
> >>>>>>>   arch/arm/include/asm/mach-imx/iomux-v3.h           |
> >> 4 +
> >>>>>>>   arch/arm/include/asm/mach-imx/mxc_i2c.h            |
> >> 2 +
> >>>>>>>   arch/arm/include/asm/mach-imx/sys_proto.h          |
> 42
> >> +
> >>>>>>>   arch/arm/mach-imx/Kconfig                          |
> >> 4 +
> >>>>>>>   arch/arm/mach-imx/Makefile                         |
> >> 2 +
> >>>>>>>   arch/arm/mach-imx/cpu.c                            |
> >> 16
> >>>> +-
> >>>>>>>   arch/arm/mach-imx/imx8m/Kconfig                    |
> >> 28
> >>>> +-
> >>>>>>>   arch/arm/mach-imx/imx8m/Makefile                   |
> >> 4
> >>>> +-
> >>>>>>>   arch/arm/mach-imx/imx8m/clock_imx8mm.c             |
> >> 707
> >>>>>> +++++++
> >>>>>>>   .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |    7
> +-
> >>>>>>>   arch/arm/mach-imx/imx8m/clock_slice.c              |
> 815
> >>>>>> ++++++++
> >>>>>>>   arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg    |
> >> 16 +
> >>>>>>>   arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg      |
> >> 17 +
> >>>>>>>   arch/arm/mach-imx/imx8m/soc.c                      |
> >> 162
> >>>> +-
> >>>>>>>   arch/arm/mach-imx/spl.c                            |
> >> 8 +
> >>>>>>>   arch/arm/mach-imx/spl_imx_romapi.c                 |
> >> 292
> >>>> +++
> >>>>>>>   arch/arm/mach-rockchip/rk3288-board-tpl.c          |    5
> >> +-
> >>>>>>>   arch/arm/mach-rockchip/rk3368-board-tpl.c          |    5
> >> +-
> >>>>>>>   arch/arm/mach-rockchip/rk3399-board-spl.c          |    5
> >> +-
> >>>>>>>   arch/arm/mach-rockchip/rk3399-board-tpl.c          |    5
> >> +-
> >>>>>>>   board/freescale/imx8mm_evk/Kconfig                 |
> 12
> >> +
> >>>>>>>   board/freescale/imx8mm_evk/MAINTAINERS             |
> >> 6
> >>>> +
> >>>>>>>   board/freescale/imx8mm_evk/Makefile                |
> >> 12 +
> >>>>>>>   board/freescale/imx8mm_evk/imx8mm_evk.c            |
> >> 90
> >>>> +
> >>>>>>>   board/freescale/imx8mm_evk/lpddr4_timing.c         | 1980
> >>>>>>> ++++++++++++++++++++
> >>>>>>> board/freescale/imx8mm_evk/spl.c                   |  216
> >> +++
> >>>>>>> board/freescale/imx8mn_evk/Kconfig                 |   14 +
> >>>>>>> board/freescale/imx8mn_evk/MAINTAINERS             |    6
> >> +
> >>>>>>> board/freescale/imx8mn_evk/Makefile                |   12 +
> >>>>>>> board/freescale/imx8mn_evk/ddr4_timing.c           | 1214
> >>>>>>> ++++++++++++ board/freescale/imx8mn_evk/imx8mn_evk.c
> >>>>>> |
> >>>>>>> 85 + board/freescale/imx8mn_evk/spl.c                   |
> >>>>>>> 91
> >>>> +
> >>>>>>> board/freescale/imx8mq_evk/lpddr4_timing.c         |   16 +-
> >>>>>>> common/spl/spl_bootrom.c                           |
> 7
> >> +-
> >>>>>>> configs/imx8mm_evk_defconfig                       |   51
> >> +
> >>>>>>> configs/imx8mn_ddr4_evk_defconfig                  |   55 +
> >>>>>>> drivers/clk/clk-uclass.c                           |    3 +
> >>>>>>> drivers/clk/imx/Kconfig                            |   14 +
> >>>>>>> drivers/clk/imx/Makefile                           |    1 +
> >>>>>>> drivers/clk/imx/clk-imx8mm.c                       |  121
> >> ++
> >>>>>>> drivers/ddr/imx/imx8m/Kconfig                      |    6 +
> >>>>>>> drivers/ddr/imx/imx8m/Makefile                     |    4
> >> +-
> >>>>>>> drivers/ddr/imx/imx8m/ddr4_init.c                  |  113 --
> >>>>>>> drivers/ddr/imx/imx8m/ddr_init.c                   |  168 ++
> >>>>>>> drivers/ddr/imx/imx8m/ddrphy_utils.c               |    4 +
> >>>>>>> drivers/ddr/imx/imx8m/helper.c                     |   22 +-
> >>>>>>> drivers/ddr/imx/imx8m/lpddr4_init.c                |  188 --
> >>>>>>> drivers/i2c/mxc_i2c.c                              |   24
> >> +-
> >>>>>>> drivers/pinctrl/nxp/pinctrl-imx.c                  |    4 +-
> >>>>>>> drivers/pinctrl/nxp/pinctrl-imx8m.c                |    1 +
> >>>>>>> drivers/power/pmic/Kconfig                         |   12 +
> >>>>>>> drivers/power/pmic/Makefile                        |    2
> >> +-
> >>>>>>> drivers/serial/Kconfig                             |    2 +-
> >>>>>>> include/configs/imx8mm_evk.h                       |  200
> >> ++
> >>>>>>> include/configs/imx8mn_evk.h                       |  198
> >> ++
> >>>>>>> include/dt-bindings/clock/imx8mm-clock.h           |  244 +++
> >>>>>>> include/dt-bindings/clock/imx8mn-clock.h           |  215 +++
> >>>>>>> include/imximage.h                                 |    1
> >> +
> >>>>>>> include/linux/compat.h                             |    2 +
> >>>>>>> include/power/pmic.h                               |    2
> >> +-
> >>>>>>> include/spl.h                                      |    3
> >> +-
> >>>>>>> tools/imx8m_image.sh                               |
> >> 15 +-
> >>>>>>> tools/imx8mimage.c                                 |
> >> 31 +-
> >>>> 79
> >>>>>> files
> >>>>>>> changed, 13082 insertions(+), 814 deletions(-) create mode
> >>>>>>> 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi create mode 100644
> >>>>>>> arch/arm/dts/imx8mm-evk.dts create mode 100644
> >>>>>>> arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> >>>>>>> arch/arm/dts/imx8mm.dtsi create mode 100644
> >>>>>>> arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode 100644
> >>>>>>> arch/arm/dts/imx8mn-ddr4-evk.dts create mode 100644
> >>>>>>> arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> >>>>>>> arch/arm/dts/imx8mn.dtsi create mode 100644
> >>>>>>> arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create mode
> >>>> 100644
> >>>>>>> arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create mode
> >>>> 100644
> >>>>>>> arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create mode
> >>>> 100644
> >>>>>>> arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create mode
> >>>> 100644
> >>>>>>> arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> >>>>>>> arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} (99%)
> create
> >>>>>> mode
> >>>>>>> 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> >>>>>>> create
> >>>>>> mode
> >>>>>>> 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg create
> >>>> mode
> >>>>>>> 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode 100644
> >>>>>>> board/freescale/imx8mm_evk/Kconfig create mode 100644
> >>>>>>> board/freescale/imx8mm_evk/MAINTAINERS create mode 100644
> >>>>>>> board/freescale/imx8mm_evk/Makefile create mode 100644
> >>>>>>> board/freescale/imx8mm_evk/imx8mm_evk.c create mode 100644
> >>>>>>> board/freescale/imx8mm_evk/lpddr4_timing.c create mode 100644
> >>>>>>> board/freescale/imx8mm_evk/spl.c create mode 100644
> >>>>>>> board/freescale/imx8mn_evk/Kconfig create mode 100644
> >>>>>>> board/freescale/imx8mn_evk/MAINTAINERS create mode 100644
> >>>>>>> board/freescale/imx8mn_evk/Makefile create mode 100644
> >>>>>>> board/freescale/imx8mn_evk/ddr4_timing.c create mode 100644
> >>>>>>> board/freescale/imx8mn_evk/imx8mn_evk.c create mode 100644
> >>>>>>> board/freescale/imx8mn_evk/spl.c create mode 100644
> >>>>>>> configs/imx8mm_evk_defconfig create mode 100644
> >>>>>>> configs/imx8mn_ddr4_evk_defconfig create mode 100644
> >>>>>>> drivers/clk/imx/clk-imx8mm.c delete mode 100644
> >>>>>>> drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> >>>>>>> drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> >>>>>>> drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> >>>>>>> include/configs/imx8mm_evk.h create mode 100644
> >>>>>>> include/configs/imx8mn_evk.h create mode 100644
> >>>>>>> include/dt-bindings/clock/imx8mm-clock.h create mode 100644
> >>>>>>> include/dt-bindings/clock/imx8mn-clock.h
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> Best regards,
> >>>>>>
> >>>>>> Lukasz Majewski
> >>>>>>
> >>>>>> --
> >>>>>>
> >>>>>> DENX Software Engineering GmbH,      Managing Director:
> >> Wolfgang
> >>>>>> Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> >>>>>> Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> >>>>>> (+49)-8142-66989-80 Email: lukma@denx.de
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> Best regards,
> >>>>
> >>>> Lukasz Majewski
> >>>>
> >>>> --
> >>>>
> >>>> DENX Software Engineering GmbH,      Managing Director: Wolfgang
> >>>> Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> >>>> Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> >>>> lukma@denx.de
> >>
> >>
> >>
> >>
> >> Best regards,
> >>
> >> Lukasz Majewski
> >>
> >> --
> >>
> >> DENX Software Engineering GmbH,      Managing Director: Wolfgang
> Denk
> >> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> >> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> >> lukma@denx.de
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot@lists.denx.de
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> >
> s.denx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7Cpeng.fan%40nxp.co
> m%7Cd4953ef00c2f46b25a8c08d70b8cffa3%7C686ea1d3bc2b4c6fa92cd99c
> 5c301635%7C0%7C0%7C636990572533686342&amp;sdata=Hh1HOV7o3Mai
> iKJcf3i8sYSMUBYbTGEXgNPfyY7zMpY%3D&amp;reserved=0
> >
Lukasz Majewski July 22, 2019, 9:55 p.m. UTC | #13
On Thu, 18 Jul 2019 09:12:02 +0200
Lukasz Majewski <lukma@denx.de> wrote:

> Hi Peng,
> 
> > Hi Lukasz, Stefano,
> >   
> > > > >    
> > > > > > > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N    
> > [....]  
> > > > >
> > > > > The v5 of CCF has been posted ~2 weeks ago (with you on CC)
> > > > > with a high chance to be pulled by Stefano after the merge
> > > > > window opens.
> > > > >
> > > > > When we accept the "legacy" clock approach we will stuck with
> > > > > it for a long time.
> > > > >
> > > > > What approach is took by the Linux kernel? CCF or any other
> > > > > one?    
> > > >
> > > > I am not against CCF. I tried CCF and enabled on i.MX8MM in my
> > > > last patchset. But I have to add lots of code based on your
> > > > version, that introduces complexity for now.    
> > > 
> > > You will have to add this complexity anyway after people start
> > > demanding new clocks for IPs which they need to enable.
> > > 
> > > Moreover, the CCF v5 was posted 2 weeks ago - wasn't it enough
> > > time for applying your patches from v4?    
> > 
> > I have converted back to CCF for i.MX8MM/N. Pushed code
> > to https://github.com/MrVan/u-boot/commits/imx8mmn-ccf
> > 
> > Since there are 65 patches in my patchset, I not post to maillist.
> > 
> > Please see whether you have some general comments or not.  
> 
> I will try to provide some comments today. Thanks for the conversion.

Your patches from the github tree up to [1] seems to not touch the core
clock code and extend only clk-* (gate, mux, etc.) files.

They are similar to what you have posted previously on top of v4.

Two remarks:

- Please extract those CCF related github patches, port them on top of
  master with Stefano's last PR pulled and send to U-Boot mailing list
  (for final review and testing).

- I think that you can extend the sandbox test code [2] for binded
  clocks [3] - for example to read a clk freq value from such clock.
  Also test if the logic for "hiding" them works.


[1] -
https://github.com/MrVan/u-boot/commit/1a9b13178be10d0c6c6834808c36877b5b2dc49f

[2] -
https://github.com/MrVan/u-boot/commit/a89ca577c8c26aa962664dfe1f8e9fec1dd83f65

[3] -
https://github.com/MrVan/u-boot/commit/a088106f1b90b7ef6b7128c2c17671cd4d376aa9

> 
> > Then I'll post out to mail list. Hope it could catch this release
> > cycle.  
> 
> Let's be optimistic.
> 
> > 
> > Thanks,
> > Peng.
> >   
> > >     
> > > >    
> > > > >    
> > > > > > We might try to switch to CCF again in future,    
> > > > >
> > > > > I'm a bit skeptical about such statements. It never works like
> > > > > that
> > > > > - after it is accepted it would become a "legacy code which we
> > > > > do need to preserve".    
> > > > > > but we hope
> > > > > > i.MX8MM/N support could land in upstream soon. It has been
> > > > > > pending for months.    
> > > > >
> > > > > Was the CCF the reason for the i.MX8 not being pulled for so
> > > > > long?    
> > > >
> > > > I am not saying so.
> > > >
> > > > The first version to support i.MX8MM is in 2019-01-28. Then I
> > > > switch to CCF and posted out new version in 2019-4-30.    
> > > 
> > > Maybe the version posted in 2019-01-28 was just not ready for
> > > being pulled?
> > > 
> > > It happens that the community wants to avoid problems encountered
> > > earlier with other SoCs (like i.MX6, i.MX7), so the discussion
> > > takes time.
> > > 
> > > (The similar situation is with other projects too - how many
> > > release cycles it takes to add new SoC in Linux? Or new port to
> > > glibc?).   
> > > > we have many 3rd parties want to use mainline U-Boot, not our
> > > > vendor tree.    
> > > 
> > > There must be a reason that they want the U-Boot mainline. IMHO
> > > the main reason for it is that people not only from a single
> > > company want to add the code, so they need to discuss (and get the
> > > agreement) to avoid stepping in each other's toes.
> > > 
> > > And the discussion/tests takes time ...
> > >     
> > > > I hope
> > > > i.MX8MM/N could land in the coming merge window,    
> > > 
> > > This depends solely on the code quality I think.
> > >     
> > > > introducing more to CCF add risk.    
> > > 
> > > Risk for not being accepted?
> > > 
> > > I do see however other risk - the i.MX8 will gain one-off clock
> > > support code instead of adopting the CCF just from the outset.
> > > 
> > >     
> > > >
> > > > Thanks,
> > > > Peng.
> > > >    
> > > > >    
> > > > > >
> > > > > > Regards,
> > > > > > Peng.
> > > > > >    
> > > > > > >    
> > > > > > > >
> > > > > > > > Bai Ping (1):
> > > > > > > >   imx8mq: Update the ddrc QoS setting for B1 chip
> > > > > > > >
> > > > > > > > Jacky Bai (2):
> > > > > > > >   driver: ddr: Refine the ddr init driver on imx8m
> > > > > > > >   ddr: imx8m: Fix the ddr init hang on imx8mq
> > > > > > > >
> > > > > > > > Peng Fan (47):
> > > > > > > >   linux: compat: guard PAGE_SIZE
> > > > > > > >   dm: clk: ignore default settings when node not valid
> > > > > > > >   pinctrl: imx: use devfdt_get_addr_size_index
> > > > > > > >   i2c: mxc: add CONFIG_CLK support
> > > > > > > >   tools: imx8m_image: align spl bin image size
> > > > > > > >   ddr: imx8m: fix ddr firmware location when enable SPL
> > > > > > > > OF tools: imx8mimage: fix HDMI/FIT parsing
> > > > > > > >   imx8m: add image cfg for i.MX8MM lpddr4
> > > > > > > >   imx: add IMX8MQ kconfig entry
> > > > > > > >   imx: add IMX8MM kconfig entry
> > > > > > > >   imx: imx8mm: add clock bindings header
> > > > > > > >   imx: add i.MX8MM cpu type
> > > > > > > >   imx: spl: add spl_board_boot_device for i.MX8MM
> > > > > > > >   imx8m: update imx-regs for i.MX8MM
> > > > > > > >   imx: add get_cpu_rev support for i.MX8MM
> > > > > > > >   imx8m: rename clock to clock_imx8mq
> > > > > > > >   imx8m: restructure clock.h
> > > > > > > >   imx8m: add clk support for i.MX8MM
> > > > > > > >   imx8m: soc: probe clk before relocation
> > > > > > > >   imx8m: add pin header for i.MX8MM
> > > > > > > >   imx: add i.MX8MM PE property
> > > > > > > >   imx8m: Fix MMU table issue for OPTEE memory
> > > > > > > >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > > > >   imx8m: soc: enable SCTR clock before timer init
> > > > > > > >   serial: Kconfig: make MXC_UART usable for MX7 and
> > > > > > > > IMX8M clk: imx: add Kconfig entry for i.MX8MM
> > > > > > > >   clk: imx: add i.MX8MM clk driver
> > > > > > > >   imx: add i.MX8MM EVK board support
> > > > > > > >   imx: add i.MX8MN kconfig entry
> > > > > > > >   imx8mn: support get_cpu_rev
> > > > > > > >   imx8m: add clk support for i.MX8MN
> > > > > > > >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > > > >   imx: add i.MX8MN PE property
> > > > > > > >   imx8mn: add pin header
> > > > > > > >   imx: spl: use spl_board_boot_device for i.MX8MN
> > > > > > > >   spl: pass args to board_return_to_bootrom
> > > > > > > >   imx: add rom api support
> > > > > > > >   imx: cpu: restrict get_boot_device
> > > > > > > >   imx8mn: add get_boot_device
> > > > > > > >   power: pmic: add SPL_DM_PMIC
> > > > > > > >   tools: imx8mimage: add ROM VERSION
> > > > > > > >   pinctrl: imx8m: support i.MX8MN
> > > > > > > >   tools: imx8m_image: support ddr4 firmware
> > > > > > > >   clk: imx: add i.MX8MN clk support
> > > > > > > >   imx8m: add i.MX8MN ddr4 image cfg file
> > > > > > > >   imx: add dtsi for i.MX8MN
> > > > > > > >   imx: add i.MX8MN DDR4 board support
> > > > > > > >
> > > > > > > > Ye Li (2):
> > > > > > > >   imx8m: Configure trustzone region 0 for non-secure
> > > > > > > > access ddr: imx8m: Fix ddr4 driver build issue
> > > > > > > >
> > > > > > > >  arch/arm/dts/Makefile
> > > > > > > > |    
> > > 4    
> > > > > +-    
> > > > > > > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |
> > > > > > > > 92    
> > > +    
> > > > > > > >  arch/arm/dts/imx8mm-evk.dts
> > > > > > > > |    
> > > 235    
> > > > > +++    
> > > > > > > >  arch/arm/dts/imx8mm-pinfunc.h
> > > > > > > > |    
> > > 629    
> > > > > > > +++++++    
> > > > > > > >  arch/arm/dts/imx8mm.dtsi
> > > > > > > > |    
> > > 733    
> > > > > > > ++++++++    
> > > > > > > >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |
> > > > > > > > 92 + arch/arm/dts/imx8mn-ddr4-evk.dts
> > > > > > > > |    
> > > 221    
> > > > > +++    
> > > > > > > >  arch/arm/dts/imx8mn-pinfunc.h
> > > > > > > > |    
> > > 646    
> > > > > > > +++++++    
> > > > > > > >  arch/arm/dts/imx8mn.dtsi
> > > > > > > > |    
> > > 712    
> > > > > > > +++++++    
> > > > > > > >  arch/arm/include/asm/arch-imx/cpu.h                |
> > > > > > > > 7    
> > > +    
> > > > > > > >  arch/arm/include/asm/arch-imx8m/clock.h            |
> > > > > > > > 494    
> > > > > +----    
> > > > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
> > > > > > > > |    
> > > 465    
> > > > > > > +++++    
> > > > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |
> > > > > > > > 424    
> > > > > +++++    
> > > > > > > >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |
> > > > > > > > 75    
> > > +-    
> > > > > > > >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h
> > > > > > > > |    
> > > 691    
> > > > > > > +++++++    
> > > > > > > >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |
> > > > > > > > 763    
> > > > > > > ++++++++    
> > > > > > > >  arch/arm/include/asm/mach-imx/iomux-v3.h
> > > > > > > > |    
> > > 4 +    
> > > > > > > >  arch/arm/include/asm/mach-imx/mxc_i2c.h
> > > > > > > > |    
> > > 2 +    
> > > > > > > >  arch/arm/include/asm/mach-imx/sys_proto.h          |
> > > > > > > > 42    
> > > +    
> > > > > > > >  arch/arm/mach-imx/Kconfig
> > > > > > > > |    
> > > 4 +    
> > > > > > > >  arch/arm/mach-imx/Makefile
> > > > > > > > |    
> > > 2 +    
> > > > > > > >  arch/arm/mach-imx/cpu.c
> > > > > > > > |    
> > > 16    
> > > > > +-    
> > > > > > > >  arch/arm/mach-imx/imx8m/Kconfig
> > > > > > > > |    
> > > 28    
> > > > > +-    
> > > > > > > >  arch/arm/mach-imx/imx8m/Makefile
> > > > > > > > |    
> > > 4    
> > > > > +-    
> > > > > > > >  arch/arm/mach-imx/imx8m/clock_imx8mm.c
> > > > > > > > |    
> > > 707    
> > > > > > > +++++++    
> > > > > > > >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |
> > > > > > > > 7 +- arch/arm/mach-imx/imx8m/clock_slice.c
> > > > > > > > |  815    
> > > > > > > ++++++++    
> > > > > > > >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > > > > |    
> > > 16 +    
> > > > > > > >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg
> > > > > > > > |    
> > > 17 +    
> > > > > > > >  arch/arm/mach-imx/imx8m/soc.c
> > > > > > > > |    
> > > 162    
> > > > > +-    
> > > > > > > >  arch/arm/mach-imx/spl.c
> > > > > > > > |    
> > > 8 +    
> > > > > > > >  arch/arm/mach-imx/spl_imx_romapi.c
> > > > > > > > |    
> > > 292    
> > > > > +++    
> > > > > > > >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |
> > > > > > > > 5    
> > > +-    
> > > > > > > >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |
> > > > > > > > 5    
> > > +-    
> > > > > > > >  arch/arm/mach-rockchip/rk3399-board-spl.c          |
> > > > > > > > 5    
> > > +-    
> > > > > > > >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |
> > > > > > > > 5    
> > > +-    
> > > > > > > >  board/freescale/imx8mm_evk/Kconfig                 |
> > > > > > > > 12    
> > > +    
> > > > > > > >  board/freescale/imx8mm_evk/MAINTAINERS
> > > > > > > > |    
> > > 6    
> > > > > +    
> > > > > > > >  board/freescale/imx8mm_evk/Makefile
> > > > > > > > |    
> > > 12 +    
> > > > > > > >  board/freescale/imx8mm_evk/imx8mm_evk.c
> > > > > > > > |    
> > > 90    
> > > > > +    
> > > > > > > >  board/freescale/imx8mm_evk/lpddr4_timing.c         |
> > > > > > > > 1980 ++++++++++++++++++++
> > > > > > > > board/freescale/imx8mm_evk/spl.c                   |
> > > > > > > > 216    
> > > +++    
> > > > > > > > board/freescale/imx8mn_evk/Kconfig                 |
> > > > > > > > 14
> > > > > > > > + board/freescale/imx8mn_evk/MAINTAINERS             |
> > > > > > > > 6    
> > > +    
> > > > > > > > board/freescale/imx8mn_evk/Makefile                |
> > > > > > > > 12
> > > > > > > > + board/freescale/imx8mn_evk/ddr4_timing.c           |
> > > > > > > > 1214 ++++++++++++
> > > > > > > > board/freescale/imx8mn_evk/imx8mn_evk.c    
> > > > > > > |    
> > > > > > > > 85 + board/freescale/imx8mn_evk/spl.c
> > > > > > > > | 91    
> > > > > +    
> > > > > > > > board/freescale/imx8mq_evk/lpddr4_timing.c         |
> > > > > > > > 16 +- common/spl/spl_bootrom.c
> > > > > > > > |    7    
> > > +-    
> > > > > > > > configs/imx8mm_evk_defconfig                       |
> > > > > > > > 51    
> > > +    
> > > > > > > > configs/imx8mn_ddr4_evk_defconfig                  |
> > > > > > > > 55
> > > > > > > > + drivers/clk/clk-uclass.c                           |
> > > > > > > > 3 + drivers/clk/imx/Kconfig
> > > > > > > > |   14 +
> > > > > > > > drivers/clk/imx/Makefile                           |
> > > > > > > > 1
> > > > > > > > + drivers/clk/imx/clk-imx8mm.c                       |
> > > > > > > > 121    
> > > ++    
> > > > > > > > drivers/ddr/imx/imx8m/Kconfig                      |
> > > > > > > > 6
> > > > > > > > + drivers/ddr/imx/imx8m/Makefile                     |
> > > > > > > > 4    
> > > +-    
> > > > > > > > drivers/ddr/imx/imx8m/ddr4_init.c                  |
> > > > > > > > 113 --
> > > > > > > > drivers/ddr/imx/imx8m/ddr_init.c                   |
> > > > > > > > 168 ++ drivers/ddr/imx/imx8m/ddrphy_utils.c |    4 +
> > > > > > > > drivers/ddr/imx/imx8m/helper.c                     |
> > > > > > > > 22 +-
> > > > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c                |
> > > > > > > > 188 -- drivers/i2c/mxc_i2c.c |   24    
> > > +-    
> > > > > > > > drivers/pinctrl/nxp/pinctrl-imx.c                  |
> > > > > > > > 4 +- drivers/pinctrl/nxp/pinctrl-imx8m.c
> > > > > > > > |    1 +
> > > > > > > > drivers/power/pmic/Kconfig                         |
> > > > > > > > 12
> > > > > > > > + drivers/power/pmic/Makefile                        |
> > > > > > > > 2    
> > > +-    
> > > > > > > > drivers/serial/Kconfig                             |
> > > > > > > > 2 +- include/configs/imx8mm_evk.h
> > > > > > > > | 200    
> > > ++    
> > > > > > > > include/configs/imx8mn_evk.h                       |
> > > > > > > > 198    
> > > ++    
> > > > > > > > include/dt-bindings/clock/imx8mm-clock.h           |
> > > > > > > > 244 +++
> > > > > > > > include/dt-bindings/clock/imx8mn-clock.h           |
> > > > > > > > 215 +++
> > > > > > > > include/imximage.h                                 |
> > > > > > > > 1    
> > > +    
> > > > > > > > include/linux/compat.h                             |
> > > > > > > > 2
> > > > > > > > + include/power/pmic.h                               |
> > > > > > > > 2    
> > > +-    
> > > > > > > > include/spl.h                                      |
> > > > > > > > 3    
> > > +-    
> > > > > > > > tools/imx8m_image.sh                               |    
> > > 15 +-    
> > > > > > > > tools/imx8mimage.c                                 |    
> > > 31 +-    
> > > > > 79    
> > > > > > > files    
> > > > > > > > changed, 13082 insertions(+), 814 deletions(-) create
> > > > > > > > mode 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi create
> > > > > > > > mode 100644 arch/arm/dts/imx8mm-evk.dts create mode
> > > > > > > > 100644 arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> > > > > > > > arch/arm/dts/imx8mm.dtsi create mode 100644
> > > > > > > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode
> > > > > > > > 100644 arch/arm/dts/imx8mn-ddr4-evk.dts create mode
> > > > > > > > 100644 arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> > > > > > > > arch/arm/dts/imx8mn.dtsi create mode 100644
> > > > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create
> > > > > > > > mode    
> > > > > 100644    
> > > > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create
> > > > > > > > mode    
> > > > > 100644    
> > > > > > > > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create
> > > > > > > > mode    
> > > > > 100644    
> > > > > > > > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create
> > > > > > > > mode    
> > > > > 100644    
> > > > > > > > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > > > > > > > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c}
> > > > > > > > (99%) create    
> > > > > > > mode    
> > > > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > > > > create    
> > > > > > > mode    
> > > > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg
> > > > > > > > create    
> > > > > mode    
> > > > > > > > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode
> > > > > > > > 100644 board/freescale/imx8mm_evk/Kconfig create mode
> > > > > > > > 100644 board/freescale/imx8mm_evk/MAINTAINERS create
> > > > > > > > mode 100644 board/freescale/imx8mm_evk/Makefile create
> > > > > > > > mode 100644 board/freescale/imx8mm_evk/imx8mm_evk.c
> > > > > > > > create mode 100644
> > > > > > > > board/freescale/imx8mm_evk/lpddr4_timing.c create mode
> > > > > > > > 100644 board/freescale/imx8mm_evk/spl.c create mode
> > > > > > > > 100644 board/freescale/imx8mn_evk/Kconfig create mode
> > > > > > > > 100644 board/freescale/imx8mn_evk/MAINTAINERS create
> > > > > > > > mode 100644 board/freescale/imx8mn_evk/Makefile create
> > > > > > > > mode 100644 board/freescale/imx8mn_evk/ddr4_timing.c
> > > > > > > > create mode 100644
> > > > > > > > board/freescale/imx8mn_evk/imx8mn_evk.c create mode
> > > > > > > > 100644 board/freescale/imx8mn_evk/spl.c create mode
> > > > > > > > 100644 configs/imx8mm_evk_defconfig create mode 100644
> > > > > > > > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > > > > > > > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > > > > > > > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > > > > > > > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > > > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > > > > > > > include/configs/imx8mm_evk.h create mode 100644
> > > > > > > > include/configs/imx8mn_evk.h create mode 100644
> > > > > > > > include/dt-bindings/clock/imx8mm-clock.h create mode
> > > > > > > > 100644 include/dt-bindings/clock/imx8mn-clock.h   
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Best regards,
> > > > > > >
> > > > > > > Lukasz Majewski
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > DENX Software Engineering GmbH,      Managing
> > > > > > > Director:    
> > > Wolfgang    
> > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de    
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Lukasz Majewski
> > > > >
> > > > > --
> > > > >
> > > > > DENX Software Engineering GmbH,      Managing Director:
> > > > > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > > (+49)-8142-66989-80 Email: lukma@denx.de    
> > > 
> > > 
> > > 
> > > 
> > > Best regards,
> > > 
> > > Lukasz Majewski
> > > 
> > > --
> > > 
> > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > > lukma@denx.de    
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Peng Fan July 23, 2019, 2:39 a.m. UTC | #14
Hi Lukasz,

> -----Original Message-----
> From: Lukasz Majewski [mailto:lukma@denx.de]
> Sent: 2019年7月23日 5:56
> To: Peng Fan <peng.fan@nxp.com>
> Cc: u-boot@lists.denx.de; dl-uboot-imx <uboot-imx@nxp.com>
> Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> 
> On Thu, 18 Jul 2019 09:12:02 +0200
> Lukasz Majewski <lukma@denx.de> wrote:
> 
> > Hi Peng,
> >
> > > Hi Lukasz, Stefano,
> > >
> > > > > >
> > > > > > > > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> > > [....]
> > > > > >
> > > > > > The v5 of CCF has been posted ~2 weeks ago (with you on CC)
> > > > > > with a high chance to be pulled by Stefano after the merge
> > > > > > window opens.
> > > > > >
> > > > > > When we accept the "legacy" clock approach we will stuck with
> > > > > > it for a long time.
> > > > > >
> > > > > > What approach is took by the Linux kernel? CCF or any other
> > > > > > one?
> > > > >
> > > > > I am not against CCF. I tried CCF and enabled on i.MX8MM in my
> > > > > last patchset. But I have to add lots of code based on your
> > > > > version, that introduces complexity for now.
> > > >
> > > > You will have to add this complexity anyway after people start
> > > > demanding new clocks for IPs which they need to enable.
> > > >
> > > > Moreover, the CCF v5 was posted 2 weeks ago - wasn't it enough
> > > > time for applying your patches from v4?
> > >
> > > I have converted back to CCF for i.MX8MM/N. Pushed code to
> > > https://github.com/MrVan/u-boot/commits/imx8mmn-ccf
> > >
> > > Since there are 65 patches in my patchset, I not post to maillist.
> > >
> > > Please see whether you have some general comments or not.
> >
> > I will try to provide some comments today. Thanks for the conversion.
> 
> Your patches from the github tree up to [1] seems to not touch the core clock
> code and extend only clk-* (gate, mux, etc.) files.
> 
> They are similar to what you have posted previously on top of v4.
> 
> Two remarks:
> 
> - Please extract those CCF related github patches, port them on top of
>   master with Stefano's last PR pulled and send to U-Boot mailing list
>   (for final review and testing).

Ok.

> 
> - I think that you can extend the sandbox test code [2] for binded
>   clocks [3] - for example to read a clk freq value from such clock.
>   Also test if the logic for "hiding" them works.

The composite clk needs a vendor specific divider ops, then
it could get the freq. However common composite not have that,
I have i.MX8M specific divider ops, but add this to sandbox test
seems not good.

Thanks,
Peng.

> 
> 
> [1] -
> https://github.com/MrVan/u-boot/commit/1a9b13178be10d0c6c6834808c3
> 6877b5b2dc49f
> 
> [2] -
> https://github.com/MrVan/u-boot/commit/a89ca577c8c26aa962664dfe1f8e
> 9fec1dd83f65
> 
> [3] -
> https://github.com/MrVan/u-boot/commit/a088106f1b90b7ef6b7128c2c176
> 71cd4d376aa9
> 
> >
> > > Then I'll post out to mail list. Hope it could catch this release
> > > cycle.
> >
> > Let's be optimistic.
> >
> > >
> > > Thanks,
> > > Peng.
> > >
> > > >
> > > > >
> > > > > >
> > > > > > > We might try to switch to CCF again in future,
> > > > > >
> > > > > > I'm a bit skeptical about such statements. It never works like
> > > > > > that
> > > > > > - after it is accepted it would become a "legacy code which we
> > > > > > do need to preserve".
> > > > > > > but we hope
> > > > > > > i.MX8MM/N support could land in upstream soon. It has been
> > > > > > > pending for months.
> > > > > >
> > > > > > Was the CCF the reason for the i.MX8 not being pulled for so
> > > > > > long?
> > > > >
> > > > > I am not saying so.
> > > > >
> > > > > The first version to support i.MX8MM is in 2019-01-28. Then I
> > > > > switch to CCF and posted out new version in 2019-4-30.
> > > >
> > > > Maybe the version posted in 2019-01-28 was just not ready for
> > > > being pulled?
> > > >
> > > > It happens that the community wants to avoid problems encountered
> > > > earlier with other SoCs (like i.MX6, i.MX7), so the discussion
> > > > takes time.
> > > >
> > > > (The similar situation is with other projects too - how many
> > > > release cycles it takes to add new SoC in Linux? Or new port to
> > > > glibc?).
> > > > > we have many 3rd parties want to use mainline U-Boot, not our
> > > > > vendor tree.
> > > >
> > > > There must be a reason that they want the U-Boot mainline. IMHO
> > > > the main reason for it is that people not only from a single
> > > > company want to add the code, so they need to discuss (and get the
> > > > agreement) to avoid stepping in each other's toes.
> > > >
> > > > And the discussion/tests takes time ...
> > > >
> > > > > I hope
> > > > > i.MX8MM/N could land in the coming merge window,
> > > >
> > > > This depends solely on the code quality I think.
> > > >
> > > > > introducing more to CCF add risk.
> > > >
> > > > Risk for not being accepted?
> > > >
> > > > I do see however other risk - the i.MX8 will gain one-off clock
> > > > support code instead of adopting the CCF just from the outset.
> > > >
> > > >
> > > > >
> > > > > Thanks,
> > > > > Peng.
> > > > >
> > > > > >
> > > > > > >
> > > > > > > Regards,
> > > > > > > Peng.
> > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > > Bai Ping (1):
> > > > > > > > >   imx8mq: Update the ddrc QoS setting for B1 chip
> > > > > > > > >
> > > > > > > > > Jacky Bai (2):
> > > > > > > > >   driver: ddr: Refine the ddr init driver on imx8m
> > > > > > > > >   ddr: imx8m: Fix the ddr init hang on imx8mq
> > > > > > > > >
> > > > > > > > > Peng Fan (47):
> > > > > > > > >   linux: compat: guard PAGE_SIZE
> > > > > > > > >   dm: clk: ignore default settings when node not valid
> > > > > > > > >   pinctrl: imx: use devfdt_get_addr_size_index
> > > > > > > > >   i2c: mxc: add CONFIG_CLK support
> > > > > > > > >   tools: imx8m_image: align spl bin image size
> > > > > > > > >   ddr: imx8m: fix ddr firmware location when enable SPL
> > > > > > > > > OF tools: imx8mimage: fix HDMI/FIT parsing
> > > > > > > > >   imx8m: add image cfg for i.MX8MM lpddr4
> > > > > > > > >   imx: add IMX8MQ kconfig entry
> > > > > > > > >   imx: add IMX8MM kconfig entry
> > > > > > > > >   imx: imx8mm: add clock bindings header
> > > > > > > > >   imx: add i.MX8MM cpu type
> > > > > > > > >   imx: spl: add spl_board_boot_device for i.MX8MM
> > > > > > > > >   imx8m: update imx-regs for i.MX8MM
> > > > > > > > >   imx: add get_cpu_rev support for i.MX8MM
> > > > > > > > >   imx8m: rename clock to clock_imx8mq
> > > > > > > > >   imx8m: restructure clock.h
> > > > > > > > >   imx8m: add clk support for i.MX8MM
> > > > > > > > >   imx8m: soc: probe clk before relocation
> > > > > > > > >   imx8m: add pin header for i.MX8MM
> > > > > > > > >   imx: add i.MX8MM PE property
> > > > > > > > >   imx8m: Fix MMU table issue for OPTEE memory
> > > > > > > > >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > > > > >   imx8m: soc: enable SCTR clock before timer init
> > > > > > > > >   serial: Kconfig: make MXC_UART usable for MX7 and
> > > > > > > > > IMX8M clk: imx: add Kconfig entry for i.MX8MM
> > > > > > > > >   clk: imx: add i.MX8MM clk driver
> > > > > > > > >   imx: add i.MX8MM EVK board support
> > > > > > > > >   imx: add i.MX8MN kconfig entry
> > > > > > > > >   imx8mn: support get_cpu_rev
> > > > > > > > >   imx8m: add clk support for i.MX8MN
> > > > > > > > >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > > > > >   imx: add i.MX8MN PE property
> > > > > > > > >   imx8mn: add pin header
> > > > > > > > >   imx: spl: use spl_board_boot_device for i.MX8MN
> > > > > > > > >   spl: pass args to board_return_to_bootrom
> > > > > > > > >   imx: add rom api support
> > > > > > > > >   imx: cpu: restrict get_boot_device
> > > > > > > > >   imx8mn: add get_boot_device
> > > > > > > > >   power: pmic: add SPL_DM_PMIC
> > > > > > > > >   tools: imx8mimage: add ROM VERSION
> > > > > > > > >   pinctrl: imx8m: support i.MX8MN
> > > > > > > > >   tools: imx8m_image: support ddr4 firmware
> > > > > > > > >   clk: imx: add i.MX8MN clk support
> > > > > > > > >   imx8m: add i.MX8MN ddr4 image cfg file
> > > > > > > > >   imx: add dtsi for i.MX8MN
> > > > > > > > >   imx: add i.MX8MN DDR4 board support
> > > > > > > > >
> > > > > > > > > Ye Li (2):
> > > > > > > > >   imx8m: Configure trustzone region 0 for non-secure
> > > > > > > > > access ddr: imx8m: Fix ddr4 driver build issue
> > > > > > > > >
> > > > > > > > >  arch/arm/dts/Makefile
> > > > > > > > > |
> > > > 4
> > > > > > +-
> > > > > > > > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi                |
> > > > > > > > > 92
> > > > +
> > > > > > > > >  arch/arm/dts/imx8mm-evk.dts
> > > > > > > > > |
> > > > 235
> > > > > > +++
> > > > > > > > >  arch/arm/dts/imx8mm-pinfunc.h
> > > > > > > > > |
> > > > 629
> > > > > > > > +++++++
> > > > > > > > >  arch/arm/dts/imx8mm.dtsi
> > > > > > > > > |
> > > > 733
> > > > > > > > ++++++++
> > > > > > > > >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |
> > > > > > > > > 92 + arch/arm/dts/imx8mn-ddr4-evk.dts
> > > > > > > > > |
> > > > 221
> > > > > > +++
> > > > > > > > >  arch/arm/dts/imx8mn-pinfunc.h
> > > > > > > > > |
> > > > 646
> > > > > > > > +++++++
> > > > > > > > >  arch/arm/dts/imx8mn.dtsi
> > > > > > > > > |
> > > > 712
> > > > > > > > +++++++
> > > > > > > > >  arch/arm/include/asm/arch-imx/cpu.h                |
> > > > > > > > > 7
> > > > +
> > > > > > > > >  arch/arm/include/asm/arch-imx8m/clock.h            |
> > > > > > > > > 494
> > > > > > +----
> > > > > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
> > > > > > > > > |
> > > > 465
> > > > > > > > +++++
> > > > > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h     |
> > > > > > > > > 424
> > > > > > +++++
> > > > > > > > >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |
> > > > > > > > > 75
> > > > +-
> > > > > > > > >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h
> > > > > > > > > |
> > > > 691
> > > > > > > > +++++++
> > > > > > > > >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h      |
> > > > > > > > > 763
> > > > > > > > ++++++++
> > > > > > > > >  arch/arm/include/asm/mach-imx/iomux-v3.h
> > > > > > > > > |
> > > > 4 +
> > > > > > > > >  arch/arm/include/asm/mach-imx/mxc_i2c.h
> > > > > > > > > |
> > > > 2 +
> > > > > > > > >  arch/arm/include/asm/mach-imx/sys_proto.h          |
> > > > > > > > > 42
> > > > +
> > > > > > > > >  arch/arm/mach-imx/Kconfig
> > > > > > > > > |
> > > > 4 +
> > > > > > > > >  arch/arm/mach-imx/Makefile
> > > > > > > > > |
> > > > 2 +
> > > > > > > > >  arch/arm/mach-imx/cpu.c
> > > > > > > > > |
> > > > 16
> > > > > > +-
> > > > > > > > >  arch/arm/mach-imx/imx8m/Kconfig
> > > > > > > > > |
> > > > 28
> > > > > > +-
> > > > > > > > >  arch/arm/mach-imx/imx8m/Makefile
> > > > > > > > > |
> > > > 4
> > > > > > +-
> > > > > > > > >  arch/arm/mach-imx/imx8m/clock_imx8mm.c
> > > > > > > > > |
> > > > 707
> > > > > > > > +++++++
> > > > > > > > >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |
> > > > > > > > > 7 +- arch/arm/mach-imx/imx8m/clock_slice.c
> > > > > > > > > |  815
> > > > > > > > ++++++++
> > > > > > > > >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > > > > > |
> > > > 16 +
> > > > > > > > >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg
> > > > > > > > > |
> > > > 17 +
> > > > > > > > >  arch/arm/mach-imx/imx8m/soc.c
> > > > > > > > > |
> > > > 162
> > > > > > +-
> > > > > > > > >  arch/arm/mach-imx/spl.c
> > > > > > > > > |
> > > > 8 +
> > > > > > > > >  arch/arm/mach-imx/spl_imx_romapi.c
> > > > > > > > > |
> > > > 292
> > > > > > +++
> > > > > > > > >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |
> > > > > > > > > 5
> > > > +-
> > > > > > > > >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |
> > > > > > > > > 5
> > > > +-
> > > > > > > > >  arch/arm/mach-rockchip/rk3399-board-spl.c          |
> > > > > > > > > 5
> > > > +-
> > > > > > > > >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |
> > > > > > > > > 5
> > > > +-
> > > > > > > > >  board/freescale/imx8mm_evk/Kconfig                 |
> > > > > > > > > 12
> > > > +
> > > > > > > > >  board/freescale/imx8mm_evk/MAINTAINERS
> > > > > > > > > |
> > > > 6
> > > > > > +
> > > > > > > > >  board/freescale/imx8mm_evk/Makefile
> > > > > > > > > |
> > > > 12 +
> > > > > > > > >  board/freescale/imx8mm_evk/imx8mm_evk.c
> > > > > > > > > |
> > > > 90
> > > > > > +
> > > > > > > > >  board/freescale/imx8mm_evk/lpddr4_timing.c         |
> > > > > > > > > 1980 ++++++++++++++++++++
> > > > > > > > > board/freescale/imx8mm_evk/spl.c                   |
> > > > > > > > > 216
> > > > +++
> > > > > > > > > board/freescale/imx8mn_evk/Kconfig                 |
> > > > > > > > > 14
> > > > > > > > > + board/freescale/imx8mn_evk/MAINTAINERS
> |
> > > > > > > > > 6
> > > > +
> > > > > > > > > board/freescale/imx8mn_evk/Makefile                |
> > > > > > > > > 12
> > > > > > > > > + board/freescale/imx8mn_evk/ddr4_timing.c           |
> > > > > > > > > 1214 ++++++++++++
> > > > > > > > > board/freescale/imx8mn_evk/imx8mn_evk.c
> > > > > > > > |
> > > > > > > > > 85 + board/freescale/imx8mn_evk/spl.c
> > > > > > > > > | 91
> > > > > > +
> > > > > > > > > board/freescale/imx8mq_evk/lpddr4_timing.c         |
> > > > > > > > > 16 +- common/spl/spl_bootrom.c
> > > > > > > > > |    7
> > > > +-
> > > > > > > > > configs/imx8mm_evk_defconfig                       |
> > > > > > > > > 51
> > > > +
> > > > > > > > > configs/imx8mn_ddr4_evk_defconfig                  |
> > > > > > > > > 55
> > > > > > > > > + drivers/clk/clk-uclass.c                           |
> > > > > > > > > 3 + drivers/clk/imx/Kconfig
> > > > > > > > > |   14 +
> > > > > > > > > drivers/clk/imx/Makefile                           |
> > > > > > > > > 1
> > > > > > > > > + drivers/clk/imx/clk-imx8mm.c                       |
> > > > > > > > > 121
> > > > ++
> > > > > > > > > drivers/ddr/imx/imx8m/Kconfig                      |
> > > > > > > > > 6
> > > > > > > > > + drivers/ddr/imx/imx8m/Makefile                     |
> > > > > > > > > 4
> > > > +-
> > > > > > > > > drivers/ddr/imx/imx8m/ddr4_init.c                  |
> > > > > > > > > 113 --
> > > > > > > > > drivers/ddr/imx/imx8m/ddr_init.c                   |
> > > > > > > > > 168 ++ drivers/ddr/imx/imx8m/ddrphy_utils.c |    4 +
> > > > > > > > > drivers/ddr/imx/imx8m/helper.c                     |
> > > > > > > > > 22 +-
> > > > > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c                |
> > > > > > > > > 188 -- drivers/i2c/mxc_i2c.c |   24
> > > > +-
> > > > > > > > > drivers/pinctrl/nxp/pinctrl-imx.c                  |
> > > > > > > > > 4 +- drivers/pinctrl/nxp/pinctrl-imx8m.c
> > > > > > > > > |    1 +
> > > > > > > > > drivers/power/pmic/Kconfig                         |
> > > > > > > > > 12
> > > > > > > > > + drivers/power/pmic/Makefile                        |
> > > > > > > > > 2
> > > > +-
> > > > > > > > > drivers/serial/Kconfig                             |
> > > > > > > > > 2 +- include/configs/imx8mm_evk.h
> > > > > > > > > | 200
> > > > ++
> > > > > > > > > include/configs/imx8mn_evk.h                       |
> > > > > > > > > 198
> > > > ++
> > > > > > > > > include/dt-bindings/clock/imx8mm-clock.h           |
> > > > > > > > > 244 +++
> > > > > > > > > include/dt-bindings/clock/imx8mn-clock.h           |
> > > > > > > > > 215 +++
> > > > > > > > > include/imximage.h                                 |
> > > > > > > > > 1
> > > > +
> > > > > > > > > include/linux/compat.h                             |
> > > > > > > > > 2
> > > > > > > > > + include/power/pmic.h
> |
> > > > > > > > > 2
> > > > +-
> > > > > > > > > include/spl.h                                      |
> > > > > > > > > 3
> > > > +-
> > > > > > > > > tools/imx8m_image.sh                               |
> > > > 15 +-
> > > > > > > > > tools/imx8mimage.c                                 |
> > > > 31 +-
> > > > > > 79
> > > > > > > > files
> > > > > > > > > changed, 13082 insertions(+), 814 deletions(-) create
> > > > > > > > > mode 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi create
> > > > > > > > > mode 100644 arch/arm/dts/imx8mm-evk.dts create mode
> > > > > > > > > 100644 arch/arm/dts/imx8mm-pinfunc.h create mode 100644
> > > > > > > > > arch/arm/dts/imx8mm.dtsi create mode 100644
> > > > > > > > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode
> > > > > > > > > 100644 arch/arm/dts/imx8mn-ddr4-evk.dts create mode
> > > > > > > > > 100644 arch/arm/dts/imx8mn-pinfunc.h create mode 100644
> > > > > > > > > arch/arm/dts/imx8mn.dtsi create mode 100644
> > > > > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create
> > > > > > > > > mode
> > > > > > 100644
> > > > > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create
> > > > > > > > > mode
> > > > > > 100644
> > > > > > > > > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create
> > > > > > > > > mode
> > > > > > 100644
> > > > > > > > > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create
> > > > > > > > > mode
> > > > > > 100644
> > > > > > > > > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > > > > > > > > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c}
> > > > > > > > > (99%) create
> > > > > > > > mode
> > > > > > > > > 100644
> arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > > > > > create
> > > > > > > > mode
> > > > > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg
> > > > > > > > > create
> > > > > > mode
> > > > > > > > > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode
> > > > > > > > > 100644 board/freescale/imx8mm_evk/Kconfig create mode
> > > > > > > > > 100644 board/freescale/imx8mm_evk/MAINTAINERS create
> > > > > > > > > mode 100644 board/freescale/imx8mm_evk/Makefile create
> > > > > > > > > mode 100644 board/freescale/imx8mm_evk/imx8mm_evk.c
> > > > > > > > > create mode 100644
> > > > > > > > > board/freescale/imx8mm_evk/lpddr4_timing.c create mode
> > > > > > > > > 100644 board/freescale/imx8mm_evk/spl.c create mode
> > > > > > > > > 100644 board/freescale/imx8mn_evk/Kconfig create mode
> > > > > > > > > 100644 board/freescale/imx8mn_evk/MAINTAINERS create
> > > > > > > > > mode 100644 board/freescale/imx8mn_evk/Makefile create
> > > > > > > > > mode 100644 board/freescale/imx8mn_evk/ddr4_timing.c
> > > > > > > > > create mode 100644
> > > > > > > > > board/freescale/imx8mn_evk/imx8mn_evk.c create mode
> > > > > > > > > 100644 board/freescale/imx8mn_evk/spl.c create mode
> > > > > > > > > 100644 configs/imx8mm_evk_defconfig create mode 100644
> > > > > > > > > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > > > > > > > > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > > > > > > > > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > > > > > > > > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > > > > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > > > > > > > > include/configs/imx8mm_evk.h create mode 100644
> > > > > > > > > include/configs/imx8mn_evk.h create mode 100644
> > > > > > > > > include/dt-bindings/clock/imx8mm-clock.h create mode
> > > > > > > > > 100644 include/dt-bindings/clock/imx8mn-clock.h
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Best regards,
> > > > > > > >
> > > > > > > > Lukasz Majewski
> > > > > > > >
> > > > > > > > --
> > > > > > > >
> > > > > > > > DENX Software Engineering GmbH,      Managing
> > > > > > > > Director:
> > > > Wolfgang
> > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Best regards,
> > > > > >
> > > > > > Lukasz Majewski
> > > > > >
> > > > > > --
> > > > > >
> > > > > > DENX Software Engineering GmbH,      Managing Director:
> > > > > > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > > > (+49)-8142-66989-80 Email: lukma@denx.de
> > > >
> > > >
> > > >
> > > >
> > > > Best regards,
> > > >
> > > > Lukasz Majewski
> > > >
> > > > --
> > > >
> > > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > > > lukma@denx.de
> >
> >
> >
> >
> > Best regards,
> >
> > Lukasz Majewski
> >
> > --
> >
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> Denk
> > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > lukma@denx.de
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de
Peng Fan July 23, 2019, 3:16 a.m. UTC | #15
> Subject: RE: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> 
> Hi Lukasz,
> 
> > -----Original Message-----
> > From: Lukasz Majewski [mailto:lukma@denx.de]
> > Sent: 2019年7月23日 5:56
> > To: Peng Fan <peng.fan@nxp.com>
> > Cc: u-boot@lists.denx.de; dl-uboot-imx <uboot-imx@nxp.com>
> > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> >
> > On Thu, 18 Jul 2019 09:12:02 +0200
> > Lukasz Majewski <lukma@denx.de> wrote:
> >
> > > Hi Peng,
> > >
> > > > Hi Lukasz, Stefano,
> > > >
> > > > > > >
> > > > > > > > > Subject: Re: [U-Boot] [PATCH 00/52] Support i.MX8MM/N
> > > > [....]
> > > > > > >
> > > > > > > The v5 of CCF has been posted ~2 weeks ago (with you on CC)
> > > > > > > with a high chance to be pulled by Stefano after the merge
> > > > > > > window opens.
> > > > > > >
> > > > > > > When we accept the "legacy" clock approach we will stuck
> > > > > > > with it for a long time.
> > > > > > >
> > > > > > > What approach is took by the Linux kernel? CCF or any other
> > > > > > > one?
> > > > > >
> > > > > > I am not against CCF. I tried CCF and enabled on i.MX8MM in my
> > > > > > last patchset. But I have to add lots of code based on your
> > > > > > version, that introduces complexity for now.
> > > > >
> > > > > You will have to add this complexity anyway after people start
> > > > > demanding new clocks for IPs which they need to enable.
> > > > >
> > > > > Moreover, the CCF v5 was posted 2 weeks ago - wasn't it enough
> > > > > time for applying your patches from v4?
> > > >
> > > > I have converted back to CCF for i.MX8MM/N. Pushed code to
> > > > https://github.com/MrVan/u-boot/commits/imx8mmn-ccf
> > > >
> > > > Since there are 65 patches in my patchset, I not post to maillist.
> > > >
> > > > Please see whether you have some general comments or not.
> > >
> > > I will try to provide some comments today. Thanks for the conversion.
> >
> > Your patches from the github tree up to [1] seems to not touch the
> > core clock code and extend only clk-* (gate, mux, etc.) files.
> >
> > They are similar to what you have posted previously on top of v4.
> >
> > Two remarks:
> >
> > - Please extract those CCF related github patches, port them on top of
> >   master with Stefano's last PR pulled and send to U-Boot mailing list
> >   (for final review and testing).
> 
> Ok.
> 
> >
> > - I think that you can extend the sandbox test code [2] for binded
> >   clocks [3] - for example to read a clk freq value from such clock.
> >   Also test if the logic for "hiding" them works.
> 
> The composite clk needs a vendor specific divider ops, then it could get the
> freq. However common composite not have that, I have i.MX8M specific
> divider ops, but add this to sandbox test seems not good.

Just posted out the patchset, please review.

Thanks,
Peng.

> 
> Thanks,
> Peng.
> 
> >
> >
> > [1] -
> >
> https://github.com/MrVan/u-boot/commit/1a9b13178be10d0c6c6834808c3
> > 6877b5b2dc49f
> >
> > [2] -
> >
> https://github.com/MrVan/u-boot/commit/a89ca577c8c26aa962664dfe1f8e
> > 9fec1dd83f65
> >
> > [3] -
> >
> https://github.com/MrVan/u-boot/commit/a088106f1b90b7ef6b7128c2c176
> > 71cd4d376aa9
> >
> > >
> > > > Then I'll post out to mail list. Hope it could catch this release
> > > > cycle.
> > >
> > > Let's be optimistic.
> > >
> > > >
> > > > Thanks,
> > > > Peng.
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > > We might try to switch to CCF again in future,
> > > > > > >
> > > > > > > I'm a bit skeptical about such statements. It never works
> > > > > > > like that
> > > > > > > - after it is accepted it would become a "legacy code which
> > > > > > > we do need to preserve".
> > > > > > > > but we hope
> > > > > > > > i.MX8MM/N support could land in upstream soon. It has been
> > > > > > > > pending for months.
> > > > > > >
> > > > > > > Was the CCF the reason for the i.MX8 not being pulled for so
> > > > > > > long?
> > > > > >
> > > > > > I am not saying so.
> > > > > >
> > > > > > The first version to support i.MX8MM is in 2019-01-28. Then I
> > > > > > switch to CCF and posted out new version in 2019-4-30.
> > > > >
> > > > > Maybe the version posted in 2019-01-28 was just not ready for
> > > > > being pulled?
> > > > >
> > > > > It happens that the community wants to avoid problems
> > > > > encountered earlier with other SoCs (like i.MX6, i.MX7), so the
> > > > > discussion takes time.
> > > > >
> > > > > (The similar situation is with other projects too - how many
> > > > > release cycles it takes to add new SoC in Linux? Or new port to
> > > > > glibc?).
> > > > > > we have many 3rd parties want to use mainline U-Boot, not our
> > > > > > vendor tree.
> > > > >
> > > > > There must be a reason that they want the U-Boot mainline. IMHO
> > > > > the main reason for it is that people not only from a single
> > > > > company want to add the code, so they need to discuss (and get
> > > > > the
> > > > > agreement) to avoid stepping in each other's toes.
> > > > >
> > > > > And the discussion/tests takes time ...
> > > > >
> > > > > > I hope
> > > > > > i.MX8MM/N could land in the coming merge window,
> > > > >
> > > > > This depends solely on the code quality I think.
> > > > >
> > > > > > introducing more to CCF add risk.
> > > > >
> > > > > Risk for not being accepted?
> > > > >
> > > > > I do see however other risk - the i.MX8 will gain one-off clock
> > > > > support code instead of adopting the CCF just from the outset.
> > > > >
> > > > >
> > > > > >
> > > > > > Thanks,
> > > > > > Peng.
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Peng.
> > > > > > > >
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Bai Ping (1):
> > > > > > > > > >   imx8mq: Update the ddrc QoS setting for B1 chip
> > > > > > > > > >
> > > > > > > > > > Jacky Bai (2):
> > > > > > > > > >   driver: ddr: Refine the ddr init driver on imx8m
> > > > > > > > > >   ddr: imx8m: Fix the ddr init hang on imx8mq
> > > > > > > > > >
> > > > > > > > > > Peng Fan (47):
> > > > > > > > > >   linux: compat: guard PAGE_SIZE
> > > > > > > > > >   dm: clk: ignore default settings when node not valid
> > > > > > > > > >   pinctrl: imx: use devfdt_get_addr_size_index
> > > > > > > > > >   i2c: mxc: add CONFIG_CLK support
> > > > > > > > > >   tools: imx8m_image: align spl bin image size
> > > > > > > > > >   ddr: imx8m: fix ddr firmware location when enable
> > > > > > > > > > SPL OF tools: imx8mimage: fix HDMI/FIT parsing
> > > > > > > > > >   imx8m: add image cfg for i.MX8MM lpddr4
> > > > > > > > > >   imx: add IMX8MQ kconfig entry
> > > > > > > > > >   imx: add IMX8MM kconfig entry
> > > > > > > > > >   imx: imx8mm: add clock bindings header
> > > > > > > > > >   imx: add i.MX8MM cpu type
> > > > > > > > > >   imx: spl: add spl_board_boot_device for i.MX8MM
> > > > > > > > > >   imx8m: update imx-regs for i.MX8MM
> > > > > > > > > >   imx: add get_cpu_rev support for i.MX8MM
> > > > > > > > > >   imx8m: rename clock to clock_imx8mq
> > > > > > > > > >   imx8m: restructure clock.h
> > > > > > > > > >   imx8m: add clk support for i.MX8MM
> > > > > > > > > >   imx8m: soc: probe clk before relocation
> > > > > > > > > >   imx8m: add pin header for i.MX8MM
> > > > > > > > > >   imx: add i.MX8MM PE property
> > > > > > > > > >   imx8m: Fix MMU table issue for OPTEE memory
> > > > > > > > > >   imx8m: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > > > > > >   imx8m: soc: enable SCTR clock before timer init
> > > > > > > > > >   serial: Kconfig: make MXC_UART usable for MX7 and
> > > > > > > > > > IMX8M clk: imx: add Kconfig entry for i.MX8MM
> > > > > > > > > >   clk: imx: add i.MX8MM clk driver
> > > > > > > > > >   imx: add i.MX8MM EVK board support
> > > > > > > > > >   imx: add i.MX8MN kconfig entry
> > > > > > > > > >   imx8mn: support get_cpu_rev
> > > > > > > > > >   imx8m: add clk support for i.MX8MN
> > > > > > > > > >   imx8mn: set BYPASS ID SWAP to avoid AXI bus errors
> > > > > > > > > >   imx: add i.MX8MN PE property
> > > > > > > > > >   imx8mn: add pin header
> > > > > > > > > >   imx: spl: use spl_board_boot_device for i.MX8MN
> > > > > > > > > >   spl: pass args to board_return_to_bootrom
> > > > > > > > > >   imx: add rom api support
> > > > > > > > > >   imx: cpu: restrict get_boot_device
> > > > > > > > > >   imx8mn: add get_boot_device
> > > > > > > > > >   power: pmic: add SPL_DM_PMIC
> > > > > > > > > >   tools: imx8mimage: add ROM VERSION
> > > > > > > > > >   pinctrl: imx8m: support i.MX8MN
> > > > > > > > > >   tools: imx8m_image: support ddr4 firmware
> > > > > > > > > >   clk: imx: add i.MX8MN clk support
> > > > > > > > > >   imx8m: add i.MX8MN ddr4 image cfg file
> > > > > > > > > >   imx: add dtsi for i.MX8MN
> > > > > > > > > >   imx: add i.MX8MN DDR4 board support
> > > > > > > > > >
> > > > > > > > > > Ye Li (2):
> > > > > > > > > >   imx8m: Configure trustzone region 0 for non-secure
> > > > > > > > > > access ddr: imx8m: Fix ddr4 driver build issue
> > > > > > > > > >
> > > > > > > > > >  arch/arm/dts/Makefile
> > > > > > > > > > |
> > > > > 4
> > > > > > > +-
> > > > > > > > > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi
> |
> > > > > > > > > > 92
> > > > > +
> > > > > > > > > >  arch/arm/dts/imx8mm-evk.dts
> > > > > > > > > > |
> > > > > 235
> > > > > > > +++
> > > > > > > > > >  arch/arm/dts/imx8mm-pinfunc.h
> > > > > > > > > > |
> > > > > 629
> > > > > > > > > +++++++
> > > > > > > > > >  arch/arm/dts/imx8mm.dtsi
> > > > > > > > > > |
> > > > > 733
> > > > > > > > > ++++++++
> > > > > > > > > >  arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi           |
> > > > > > > > > > 92 + arch/arm/dts/imx8mn-ddr4-evk.dts
> > > > > > > > > > |
> > > > > 221
> > > > > > > +++
> > > > > > > > > >  arch/arm/dts/imx8mn-pinfunc.h
> > > > > > > > > > |
> > > > > 646
> > > > > > > > > +++++++
> > > > > > > > > >  arch/arm/dts/imx8mn.dtsi
> > > > > > > > > > |
> > > > > 712
> > > > > > > > > +++++++
> > > > > > > > > >  arch/arm/include/asm/arch-imx/cpu.h
> |
> > > > > > > > > > 7
> > > > > +
> > > > > > > > > >  arch/arm/include/asm/arch-imx8m/clock.h
> |
> > > > > > > > > > 494
> > > > > > > +----
> > > > > > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
> > > > > > > > > > |
> > > > > 465
> > > > > > > > > +++++
> > > > > > > > > >  arch/arm/include/asm/arch-imx8m/clock_imx8mq.h
> |
> > > > > > > > > > 424
> > > > > > > +++++
> > > > > > > > > >  arch/arm/include/asm/arch-imx8m/imx-regs.h         |
> > > > > > > > > > 75
> > > > > +-
> > > > > > > > > >  arch/arm/include/asm/arch-imx8m/imx8mm_pins.h
> > > > > > > > > > |
> > > > > 691
> > > > > > > > > +++++++
> > > > > > > > > >  arch/arm/include/asm/arch-imx8m/imx8mn_pins.h
> |
> > > > > > > > > > 763
> > > > > > > > > ++++++++
> > > > > > > > > >  arch/arm/include/asm/mach-imx/iomux-v3.h
> > > > > > > > > > |
> > > > > 4 +
> > > > > > > > > >  arch/arm/include/asm/mach-imx/mxc_i2c.h
> > > > > > > > > > |
> > > > > 2 +
> > > > > > > > > >  arch/arm/include/asm/mach-imx/sys_proto.h
> |
> > > > > > > > > > 42
> > > > > +
> > > > > > > > > >  arch/arm/mach-imx/Kconfig
> > > > > > > > > > |
> > > > > 4 +
> > > > > > > > > >  arch/arm/mach-imx/Makefile
> > > > > > > > > > |
> > > > > 2 +
> > > > > > > > > >  arch/arm/mach-imx/cpu.c
> > > > > > > > > > |
> > > > > 16
> > > > > > > +-
> > > > > > > > > >  arch/arm/mach-imx/imx8m/Kconfig
> > > > > > > > > > |
> > > > > 28
> > > > > > > +-
> > > > > > > > > >  arch/arm/mach-imx/imx8m/Makefile
> > > > > > > > > > |
> > > > > 4
> > > > > > > +-
> > > > > > > > > >  arch/arm/mach-imx/imx8m/clock_imx8mm.c
> > > > > > > > > > |
> > > > > 707
> > > > > > > > > +++++++
> > > > > > > > > >  .../arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c} |
> > > > > > > > > > 7 +- arch/arm/mach-imx/imx8m/clock_slice.c
> > > > > > > > > > |  815
> > > > > > > > > ++++++++
> > > > > > > > > >  arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > > > > > > |
> > > > > 16 +
> > > > > > > > > >  arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg
> > > > > > > > > > |
> > > > > 17 +
> > > > > > > > > >  arch/arm/mach-imx/imx8m/soc.c
> > > > > > > > > > |
> > > > > 162
> > > > > > > +-
> > > > > > > > > >  arch/arm/mach-imx/spl.c
> > > > > > > > > > |
> > > > > 8 +
> > > > > > > > > >  arch/arm/mach-imx/spl_imx_romapi.c
> > > > > > > > > > |
> > > > > 292
> > > > > > > +++
> > > > > > > > > >  arch/arm/mach-rockchip/rk3288-board-tpl.c          |
> > > > > > > > > > 5
> > > > > +-
> > > > > > > > > >  arch/arm/mach-rockchip/rk3368-board-tpl.c          |
> > > > > > > > > > 5
> > > > > +-
> > > > > > > > > >  arch/arm/mach-rockchip/rk3399-board-spl.c          |
> > > > > > > > > > 5
> > > > > +-
> > > > > > > > > >  arch/arm/mach-rockchip/rk3399-board-tpl.c          |
> > > > > > > > > > 5
> > > > > +-
> > > > > > > > > >  board/freescale/imx8mm_evk/Kconfig
> |
> > > > > > > > > > 12
> > > > > +
> > > > > > > > > >  board/freescale/imx8mm_evk/MAINTAINERS
> > > > > > > > > > |
> > > > > 6
> > > > > > > +
> > > > > > > > > >  board/freescale/imx8mm_evk/Makefile
> > > > > > > > > > |
> > > > > 12 +
> > > > > > > > > >  board/freescale/imx8mm_evk/imx8mm_evk.c
> > > > > > > > > > |
> > > > > 90
> > > > > > > +
> > > > > > > > > >  board/freescale/imx8mm_evk/lpddr4_timing.c         |
> > > > > > > > > > 1980 ++++++++++++++++++++
> > > > > > > > > > board/freescale/imx8mm_evk/spl.c                   |
> > > > > > > > > > 216
> > > > > +++
> > > > > > > > > > board/freescale/imx8mn_evk/Kconfig                 |
> > > > > > > > > > 14
> > > > > > > > > > + board/freescale/imx8mn_evk/MAINTAINERS
> > |
> > > > > > > > > > 6
> > > > > +
> > > > > > > > > > board/freescale/imx8mn_evk/Makefile                |
> > > > > > > > > > 12
> > > > > > > > > > + board/freescale/imx8mn_evk/ddr4_timing.c           |
> > > > > > > > > > 1214 ++++++++++++
> > > > > > > > > > board/freescale/imx8mn_evk/imx8mn_evk.c
> > > > > > > > > |
> > > > > > > > > > 85 + board/freescale/imx8mn_evk/spl.c
> > > > > > > > > > | 91
> > > > > > > +
> > > > > > > > > > board/freescale/imx8mq_evk/lpddr4_timing.c         |
> > > > > > > > > > 16 +- common/spl/spl_bootrom.c
> > > > > > > > > > |    7
> > > > > +-
> > > > > > > > > > configs/imx8mm_evk_defconfig                       |
> > > > > > > > > > 51
> > > > > +
> > > > > > > > > > configs/imx8mn_ddr4_evk_defconfig                  |
> > > > > > > > > > 55
> > > > > > > > > > + drivers/clk/clk-uclass.c                           |
> > > > > > > > > > 3 + drivers/clk/imx/Kconfig
> > > > > > > > > > |   14 +
> > > > > > > > > > drivers/clk/imx/Makefile                           |
> > > > > > > > > > 1
> > > > > > > > > > + drivers/clk/imx/clk-imx8mm.c
> |
> > > > > > > > > > 121
> > > > > ++
> > > > > > > > > > drivers/ddr/imx/imx8m/Kconfig                      |
> > > > > > > > > > 6
> > > > > > > > > > + drivers/ddr/imx/imx8m/Makefile
> |
> > > > > > > > > > 4
> > > > > +-
> > > > > > > > > > drivers/ddr/imx/imx8m/ddr4_init.c                  |
> > > > > > > > > > 113 --
> > > > > > > > > > drivers/ddr/imx/imx8m/ddr_init.c                   |
> > > > > > > > > > 168 ++ drivers/ddr/imx/imx8m/ddrphy_utils.c |    4 +
> > > > > > > > > > drivers/ddr/imx/imx8m/helper.c                     |
> > > > > > > > > > 22 +-
> > > > > > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c                |
> > > > > > > > > > 188 -- drivers/i2c/mxc_i2c.c |   24
> > > > > +-
> > > > > > > > > > drivers/pinctrl/nxp/pinctrl-imx.c                  |
> > > > > > > > > > 4 +- drivers/pinctrl/nxp/pinctrl-imx8m.c
> > > > > > > > > > |    1 +
> > > > > > > > > > drivers/power/pmic/Kconfig                         |
> > > > > > > > > > 12
> > > > > > > > > > + drivers/power/pmic/Makefile
> |
> > > > > > > > > > 2
> > > > > +-
> > > > > > > > > > drivers/serial/Kconfig                             |
> > > > > > > > > > 2 +- include/configs/imx8mm_evk.h
> > > > > > > > > > | 200
> > > > > ++
> > > > > > > > > > include/configs/imx8mn_evk.h                       |
> > > > > > > > > > 198
> > > > > ++
> > > > > > > > > > include/dt-bindings/clock/imx8mm-clock.h           |
> > > > > > > > > > 244 +++
> > > > > > > > > > include/dt-bindings/clock/imx8mn-clock.h           |
> > > > > > > > > > 215 +++
> > > > > > > > > > include/imximage.h
> |
> > > > > > > > > > 1
> > > > > +
> > > > > > > > > > include/linux/compat.h                             |
> > > > > > > > > > 2
> > > > > > > > > > + include/power/pmic.h
> > |
> > > > > > > > > > 2
> > > > > +-
> > > > > > > > > > include/spl.h                                      |
> > > > > > > > > > 3
> > > > > +-
> > > > > > > > > > tools/imx8m_image.sh
> |
> > > > > 15 +-
> > > > > > > > > > tools/imx8mimage.c
> |
> > > > > 31 +-
> > > > > > > 79
> > > > > > > > > files
> > > > > > > > > > changed, 13082 insertions(+), 814 deletions(-) create
> > > > > > > > > > mode 100644 arch/arm/dts/imx8mm-evk-u-boot.dtsi create
> > > > > > > > > > mode 100644 arch/arm/dts/imx8mm-evk.dts create mode
> > > > > > > > > > 100644 arch/arm/dts/imx8mm-pinfunc.h create mode
> > > > > > > > > > 100644 arch/arm/dts/imx8mm.dtsi create mode 100644
> > > > > > > > > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi create mode
> > > > > > > > > > 100644 arch/arm/dts/imx8mn-ddr4-evk.dts create mode
> > > > > > > > > > 100644 arch/arm/dts/imx8mn-pinfunc.h create mode
> > > > > > > > > > 100644 arch/arm/dts/imx8mn.dtsi create mode 100644
> > > > > > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mm.h create
> > > > > > > > > > mode
> > > > > > > 100644
> > > > > > > > > > arch/arm/include/asm/arch-imx8m/clock_imx8mq.h create
> > > > > > > > > > mode
> > > > > > > 100644
> > > > > > > > > > arch/arm/include/asm/arch-imx8m/imx8mm_pins.h create
> > > > > > > > > > mode
> > > > > > > 100644
> > > > > > > > > > arch/arm/include/asm/arch-imx8m/imx8mn_pins.h create
> > > > > > > > > > mode
> > > > > > > 100644
> > > > > > > > > > arch/arm/mach-imx/imx8m/clock_imx8mm.c rename
> > > > > > > > > > arch/arm/mach-imx/imx8m/{clock.c => clock_imx8mq.c}
> > > > > > > > > > (99%) create
> > > > > > > > > mode
> > > > > > > > > > 100644
> > arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > > > > > > > > > create
> > > > > > > > > mode
> > > > > > > > > > 100644 arch/arm/mach-imx/imx8m/imximage-8mn-ddr4.cfg
> > > > > > > > > > create
> > > > > > > mode
> > > > > > > > > > 100644 arch/arm/mach-imx/spl_imx_romapi.c create mode
> > > > > > > > > > 100644 board/freescale/imx8mm_evk/Kconfig create mode
> > > > > > > > > > 100644 board/freescale/imx8mm_evk/MAINTAINERS create
> > > > > > > > > > mode 100644 board/freescale/imx8mm_evk/Makefile create
> > > > > > > > > > mode 100644 board/freescale/imx8mm_evk/imx8mm_evk.c
> > > > > > > > > > create mode 100644
> > > > > > > > > > board/freescale/imx8mm_evk/lpddr4_timing.c create mode
> > > > > > > > > > 100644 board/freescale/imx8mm_evk/spl.c create mode
> > > > > > > > > > 100644 board/freescale/imx8mn_evk/Kconfig create mode
> > > > > > > > > > 100644 board/freescale/imx8mn_evk/MAINTAINERS create
> > > > > > > > > > mode 100644 board/freescale/imx8mn_evk/Makefile create
> > > > > > > > > > mode 100644 board/freescale/imx8mn_evk/ddr4_timing.c
> > > > > > > > > > create mode 100644
> > > > > > > > > > board/freescale/imx8mn_evk/imx8mn_evk.c create mode
> > > > > > > > > > 100644 board/freescale/imx8mn_evk/spl.c create mode
> > > > > > > > > > 100644 configs/imx8mm_evk_defconfig create mode 100644
> > > > > > > > > > configs/imx8mn_ddr4_evk_defconfig create mode 100644
> > > > > > > > > > drivers/clk/imx/clk-imx8mm.c delete mode 100644
> > > > > > > > > > drivers/ddr/imx/imx8m/ddr4_init.c create mode 100644
> > > > > > > > > > drivers/ddr/imx/imx8m/ddr_init.c delete mode 100644
> > > > > > > > > > drivers/ddr/imx/imx8m/lpddr4_init.c create mode 100644
> > > > > > > > > > include/configs/imx8mm_evk.h create mode 100644
> > > > > > > > > > include/configs/imx8mn_evk.h create mode 100644
> > > > > > > > > > include/dt-bindings/clock/imx8mm-clock.h create mode
> > > > > > > > > > 100644 include/dt-bindings/clock/imx8mn-clock.h
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Best regards,
> > > > > > > > >
> > > > > > > > > Lukasz Majewski
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > >
> > > > > > > > > DENX Software Engineering GmbH,      Managing
> > > > > > > > > Director:
> > > > > Wolfgang
> > > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Best regards,
> > > > > > >
> > > > > > > Lukasz Majewski
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > > DENX Software Engineering GmbH,      Managing Director:
> > > > > > > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5,
> > > > > > > D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Lukasz Majewski
> > > > >
> > > > > --
> > > > >
> > > > > DENX Software Engineering GmbH,      Managing Director:
> Wolfgang
> > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
> (+49)-8142-66989-80 Email:
> > > > > lukma@denx.de
> > >
> > >
> > >
> > >
> > > Best regards,
> > >
> > > Lukasz Majewski
> > >
> > > --
> > >
> > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk
> > > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > > Germany
> > > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > > lukma@denx.de
> >
> >
> >
> >
> > Best regards,
> >
> > Lukasz Majewski
> >
> > --
> >
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> Denk
> > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > lukma@denx.de