From d124b1437fbce91d50395111d0eff4adbce0165c Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Sun, 28 Feb 2021 20:07:07 +0100 Subject: MIPS: qemu-malta: make barebox Malta images detectable is_barebox_mips_head checks whether 0x10-0x16 is "barebox". Have the Malta images provide this signature like other MIPS boards already do. This makes bootm work. Cc: Antony Pavlov Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- arch/mips/boards/qemu-malta/lowlevel.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/mips/boards/qemu-malta/lowlevel.S b/arch/mips/boards/qemu-malta/lowlevel.S index e4ecde45cf..98821e0426 100644 --- a/arch/mips/boards/qemu-malta/lowlevel.S +++ b/arch/mips/boards/qemu-malta/lowlevel.S @@ -40,8 +40,7 @@ ENTRY_FUNCTION(BOARD_PBL_START) 0x1fc00010 address is reserved for BoardID */ .org 0x10 - .word 0xffffffff - .word 0xffffffff + .asciiz "barebox" __start: mips_disable_interrupts -- cgit v1.2.3 From 186838e09de277ac766352b0f37ba8172ebc5f0e Mon Sep 17 00:00:00 2001 From: Alexander Kurz Date: Thu, 4 Mar 2021 06:32:58 +0000 Subject: ARM: i.MX8M: bbu: fix variable name to used semantic Both flags handle BBU behavior and should be bbu_flags. Signed-off-by: Alexander Kurz Signed-off-by: Sascha Hauer --- arch/arm/boards/nxp-imx8mm-evk/board.c | 6 +++--- arch/arm/boards/nxp-imx8mp-evk/board.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/arm/boards/nxp-imx8mm-evk/board.c b/arch/arm/boards/nxp-imx8mm-evk/board.c index 2603a2ab07..6e4df60065 100644 --- a/arch/arm/boards/nxp-imx8mm-evk/board.c +++ b/arch/arm/boards/nxp-imx8mm-evk/board.c @@ -33,7 +33,7 @@ static int ar8031_phy_fixup(struct phy_device *phydev) static int nxp_imx8mm_evk_init(void) { int emmc_bbu_flag = 0; - int emmc_sd_flag = 0; + int sd_bbu_flag = 0; if (!of_machine_is_compatible("fsl,imx8mm-evk")) return 0; @@ -46,14 +46,14 @@ static int nxp_imx8mm_evk_init(void) emmc_bbu_flag = BBU_HANDLER_FLAG_DEFAULT; } else { of_device_enable_path("/chosen/environment-sd"); - emmc_sd_flag = BBU_HANDLER_FLAG_DEFAULT; + sd_bbu_flag = BBU_HANDLER_FLAG_DEFAULT; } } else { of_device_enable_path("/chosen/environment-emmc"); emmc_bbu_flag = BBU_HANDLER_FLAG_DEFAULT; } - imx8m_bbu_internal_mmc_register_handler("SD", "/dev/mmc1.barebox", emmc_sd_flag); + imx8m_bbu_internal_mmc_register_handler("SD", "/dev/mmc1.barebox", sd_bbu_flag); imx8m_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc2", emmc_bbu_flag); phy_register_fixup_for_uid(PHY_ID_AR8031, AR_PHY_ID_MASK, diff --git a/arch/arm/boards/nxp-imx8mp-evk/board.c b/arch/arm/boards/nxp-imx8mp-evk/board.c index f64f466810..a3ff598108 100644 --- a/arch/arm/boards/nxp-imx8mp-evk/board.c +++ b/arch/arm/boards/nxp-imx8mp-evk/board.c @@ -17,7 +17,7 @@ static int nxp_imx8mp_evk_init(void) { int emmc_bbu_flag = 0; - int emmc_sd_flag = 0; + int sd_bbu_flag = 0; u32 val; if (!of_machine_is_compatible("fsl,imx8mp-evk")) @@ -29,14 +29,14 @@ static int nxp_imx8mp_evk_init(void) emmc_bbu_flag = BBU_HANDLER_FLAG_DEFAULT; } else { of_device_enable_path("/chosen/environment-sd"); - emmc_sd_flag = BBU_HANDLER_FLAG_DEFAULT; + sd_bbu_flag = BBU_HANDLER_FLAG_DEFAULT; } } else { of_device_enable_path("/chosen/environment-emmc"); emmc_bbu_flag = BBU_HANDLER_FLAG_DEFAULT; } - imx8m_bbu_internal_mmc_register_handler("SD", "/dev/mmc1.barebox", emmc_sd_flag); + imx8m_bbu_internal_mmc_register_handler("SD", "/dev/mmc1.barebox", sd_bbu_flag); imx8m_bbu_internal_mmc_register_handler("eMMC", "/dev/mmc2", emmc_bbu_flag); val = readl(MX8MP_IOMUXC_GPR_BASE_ADDR + MX8MP_IOMUXC_GPR1); -- cgit v1.2.3 From e51994f1cca03bb4e87dfaac2ebbbaf94077c08c Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 9 Mar 2021 09:01:31 +0100 Subject: sandbox: add Xterm escape sequence backed LED driver There is value in testing LED trigger conditions in sandbox, especially with the coming bthread work that should replace pollers, like the one used by the heartbeat trigger. To make this testable on sandbox as well, add a simple LED driver. It supports 5 brightness levels, which are reflected as dots in the terminal title. This requires a Xterm compatible terminal, but the LED is inactive by default, so other terminals aren't affected if they lack support. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- arch/sandbox/board/Makefile | 1 + arch/sandbox/board/led.c | 67 ++++++++++++++++++++++++++++++++++++++++++++ arch/sandbox/dts/sandbox.dts | 4 +++ 3 files changed, 72 insertions(+) create mode 100644 arch/sandbox/board/led.c (limited to 'arch') diff --git a/arch/sandbox/board/Makefile b/arch/sandbox/board/Makefile index c504c967de..ffb1dbc21e 100644 --- a/arch/sandbox/board/Makefile +++ b/arch/sandbox/board/Makefile @@ -7,5 +7,6 @@ obj-y += dtb.o obj-y += power.o obj-y += dev-random.o obj-y += watchdog.o +obj-$(CONFIG_LED) += led.o extra-y += barebox.lds diff --git a/arch/sandbox/board/led.c b/arch/sandbox/board/led.c new file mode 100644 index 0000000000..b7ab81112b --- /dev/null +++ b/arch/sandbox/board/led.c @@ -0,0 +1,67 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#include +#include +#include +#include +#include + +static struct sandbox_led { + struct led led; + bool active; +} sandbox_led; + +static inline void terminal_puts(const char *s) +{ + linux_write(1, s, strlen(s)); +} + +static void sandbox_led_set(struct led *led, unsigned int brightness) +{ + terminal_puts("\x1b]2;barebox "); + while (brightness--) + terminal_puts("."); + terminal_puts("\a"); + + sandbox_led.active = true; +} + +static int sandbox_led_of_probe(struct device_d *dev) +{ + struct device_node *np = dev->device_node; + int ret; + + if (sandbox_led.led.set) + return -EBUSY; + + sandbox_led.led.name = xstrdup(np->name); + sandbox_led.led.max_value = 5; + sandbox_led.led.set = sandbox_led_set; + + ret = led_register(&sandbox_led.led); + if (ret) + return ret; + + led_of_parse_trigger(&sandbox_led.led, np); + + return 0; +} + +static void sandbox_led_of_remove(struct device_d *dev) +{ + if (sandbox_led.active) + sandbox_led_set(NULL, 0); +} + +static struct of_device_id sandbox_led_of_ids[] = { + { .compatible = "barebox,sandbox-led", }, + { } +}; + +static struct driver_d sandbox_led_of_driver = { + .name = "sandbox-led", + .probe = sandbox_led_of_probe, + .remove = sandbox_led_of_remove, + .of_compatible = sandbox_led_of_ids, +}; +device_platform_driver(sandbox_led_of_driver); diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index ef1fa7b866..e99986bb90 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -98,4 +98,8 @@ sound { compatible = "barebox,sandbox-sound"; }; + + led { + compatible = "barebox,sandbox-led"; + }; }; -- cgit v1.2.3 From 0cf19c29a325c5d31fcb6984106ec3d4c75c0af9 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 16 Mar 2021 09:59:04 +0100 Subject: ARM: stm32mp: add support for STM32MP157-EV1 board MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The STM32MP157A-EV1 and STM32MP157C-EV1 Evaluation boards are the full-feature demonstration and development platforms for STMicroelectronics Arm®-based dual Cortex®-A7 32 bits and Cortex®-M4 32 bits MPUs in the STM32MP1 Series. Add support for running barebox as SSBL on either of them. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- Documentation/boards/stm32mp.rst | 35 +++++++++++++++++++++++++-- arch/arm/boards/Makefile | 1 + arch/arm/boards/stm32mp15x-ev1/Makefile | 2 ++ arch/arm/boards/stm32mp15x-ev1/board.c | 39 +++++++++++++++++++++++++++++++ arch/arm/boards/stm32mp15x-ev1/lowlevel.c | 26 +++++++++++++++++++++ arch/arm/configs/stm32mp_defconfig | 1 + arch/arm/dts/Makefile | 1 + arch/arm/dts/stm32mp157c-ev1.dts | 20 ++++++++++++++++ arch/arm/mach-stm32mp/Kconfig | 8 +++++++ images/Makefile.stm32mp | 5 ++++ 10 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 arch/arm/boards/stm32mp15x-ev1/Makefile create mode 100644 arch/arm/boards/stm32mp15x-ev1/board.c create mode 100644 arch/arm/boards/stm32mp15x-ev1/lowlevel.c create mode 100644 arch/arm/dts/stm32mp157c-ev1.dts (limited to 'arch') diff --git a/Documentation/boards/stm32mp.rst b/Documentation/boards/stm32mp.rst index 87fff7d125..24b7a19ceb 100644 --- a/Documentation/boards/stm32mp.rst +++ b/Documentation/boards/stm32mp.rst @@ -32,6 +32,7 @@ The resulting images will be placed under ``images/``: barebox-stm32mp15xx-dkx.img # both DK1 and DK2 barebox-stm32mp157c-lxa-mc1.img barebox-stm32mp157c-seeed-odyssey.img + barebox-stm32mp15x-ev1.img # stm32mp157c-ev1 and friends Flashing barebox @@ -94,8 +95,38 @@ acknowledge. Boot source selection --------------------- -The STM32MP BootROM samples three boot pins at reset. Usually BOOT1 is -pulled down and BOOT0 and BOOT2 are connected to a 2P DIP switch:: +The STM32MP BootROM samples three boot pins at reset. On official +eval kit, they are either connected to a 3P DIP switch or 2P (with +BOOT1 pulled down). + +EV-1 +^^^^ +SW1 on the DK boards sets boot mode as follows:: + + +-------+ + | --- | + BOOT2 | O-- | + BOOT1 | O --O | + BOOT0 | N O-- | <---- SD-Card + +-------+ + + +-------+ + | --- | + BOOT2 | --O | + BOOT1 | O O-- | + BOOT0 | N --O | <---- eMMC + +-------+ + + +-------+ + | --- | + BOOT2 | --O | + BOOT1 | O --O | + BOOT0 | N --O | <---- DFU on UART and USB OTG + +-------+ + +DK-1/DK-2 +^^^^^^^^^ +Boot mode on the DK board is set as follows:: +-------+ BOOT2 | O O-- | diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile index f8cdd90ed6..732936bad6 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile @@ -134,6 +134,7 @@ obj-$(CONFIG_MACH_SOLIDRUN_CUBOX) += solidrun-cubox/ obj-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += solidrun-microsom/ obj-$(CONFIG_MACH_STM32MP15XX_DKX) += stm32mp15xx-dkx/ obj-$(CONFIG_MACH_LXA_MC1) += lxa-mc1/ +obj-$(CONFIG_MACH_STM32MP15X_EV1) += stm32mp15x-ev1/ obj-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += technexion-pico-hobbit/ obj-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += technexion-wandboard/ obj-$(CONFIG_MACH_TNY_A9260) += tny-a926x/ diff --git a/arch/arm/boards/stm32mp15x-ev1/Makefile b/arch/arm/boards/stm32mp15x-ev1/Makefile new file mode 100644 index 0000000000..092c31d6b2 --- /dev/null +++ b/arch/arm/boards/stm32mp15x-ev1/Makefile @@ -0,0 +1,2 @@ +lwl-y += lowlevel.o +obj-y += board.o diff --git a/arch/arm/boards/stm32mp15x-ev1/board.c b/arch/arm/boards/stm32mp15x-ev1/board.c new file mode 100644 index 0000000000..b8e26cd37b --- /dev/null +++ b/arch/arm/boards/stm32mp15x-ev1/board.c @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include +#include +#include +#include + +static int ed1_probe(struct device_d *dev) +{ + int flags; + + flags = bootsource_get_instance() == 0 ? BBU_HANDLER_FLAG_DEFAULT : 0; + stm32mp_bbu_mmc_register_handler("sd", "/dev/mmc0.ssbl", flags); + + flags = bootsource_get_instance() == 1 ? BBU_HANDLER_FLAG_DEFAULT : 0; + stm32mp_bbu_mmc_register_handler("emmc", "/dev/mmc1.ssbl", flags); + + if (bootsource_get_instance() == 0) + of_device_enable_path("/chosen/environment-sd"); + else + of_device_enable_path("/chosen/environment-emmc"); + + barebox_set_model("STM32MP157C-ED1"); + + return 0; +} + +/* ED1 is the SoM on top of the EV1 */ +static const struct of_device_id ed1_of_match[] = { + { .compatible = "st,stm32mp157c-ed1" }, + { /* sentinel */ }, +}; + +static struct driver_d ed1_board_driver = { + .name = "board-stm32mp15x-ed1", + .probe = ed1_probe, + .of_compatible = ed1_of_match, +}; +postcore_platform_driver(ed1_board_driver); diff --git a/arch/arm/boards/stm32mp15x-ev1/lowlevel.c b/arch/arm/boards/stm32mp15x-ev1/lowlevel.c new file mode 100644 index 0000000000..06ff6291b8 --- /dev/null +++ b/arch/arm/boards/stm32mp15x-ev1/lowlevel.c @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0+ +#include +#include +#include + +extern char __dtb_z_stm32mp157c_ev1_start[]; + +static void setup_uart(void) +{ + /* first stage has set up the UART, so nothing to do here */ + putc_ll('>'); +} + +ENTRY_FUNCTION(start_stm32mp15x_ev1, r0, r1, r2) +{ + void *fdt; + + stm32mp_cpu_lowlevel_init(); + + if (IS_ENABLED(CONFIG_DEBUG_LL)) + setup_uart(); + + fdt = __dtb_z_stm32mp157c_ev1_start + get_runtime_offset(); + + stm32mp1_barebox_entry(fdt); +} diff --git a/arch/arm/configs/stm32mp_defconfig b/arch/arm/configs/stm32mp_defconfig index e1ee4ec082..7b90002f87 100644 --- a/arch/arm/configs/stm32mp_defconfig +++ b/arch/arm/configs/stm32mp_defconfig @@ -2,6 +2,7 @@ CONFIG_ARCH_STM32MP=y CONFIG_MACH_STM32MP15XX_DKX=y CONFIG_MACH_LXA_MC1=y CONFIG_MACH_SEEED_ODYSSEY=y +CONFIG_MACH_STM32MP15X_EV1=y CONFIG_THUMB2_BAREBOX=y CONFIG_ARM_BOARD_APPEND_ATAG=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 63bd73dfaa..d5f61768a5 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -113,6 +113,7 @@ lwl-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += imx6dl-hummingboard.dtb.o imx6q-hummingb lwl-$(CONFIG_MACH_SEEED_ODYSSEY) += stm32mp157c-odyssey.dtb.o lwl-$(CONFIG_MACH_STM32MP15XX_DKX) += stm32mp157c-dk2.dtb.o stm32mp157a-dk1.dtb.o lwl-$(CONFIG_MACH_LXA_MC1) += stm32mp157c-lxa-mc1.dtb.o +lwl-$(CONFIG_MACH_STM32MP15X_EV1) += stm32mp157c-ev1.dtb.o lwl-$(CONFIG_MACH_SCB9328) += imx1-scb9328.dtb.o lwl-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += imx6q-wandboard.dtb.o imx6dl-wandboard.dtb.o lwl-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += imx6ul-pico-hobbit.dtb.o diff --git a/arch/arm/dts/stm32mp157c-ev1.dts b/arch/arm/dts/stm32mp157c-ev1.dts new file mode 100644 index 0000000000..742eca7a33 --- /dev/null +++ b/arch/arm/dts/stm32mp157c-ev1.dts @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR X11) + +#include +#include "stm32mp151.dtsi" + +/ { + chosen { + environment-sd { + compatible = "barebox,environment"; + device-path = &sdmmc1, "partname:barebox-environment"; + status = "disabled"; + }; + + environment-emmc { + compatible = "barebox,environment"; + device-path = &sdmmc2, "partname:barebox-environment"; + status = "disabled"; + }; + }; +}; diff --git a/arch/arm/mach-stm32mp/Kconfig b/arch/arm/mach-stm32mp/Kconfig index b8ccbaab67..95d3dc510d 100644 --- a/arch/arm/mach-stm32mp/Kconfig +++ b/arch/arm/mach-stm32mp/Kconfig @@ -23,4 +23,12 @@ config MACH_SEEED_ODYSSEY select ARCH_STM32MP157 bool "Seeed Studio Odyssey" +config MACH_STM32MP15X_EV1 + select ARCH_STM32MP157 + bool "STM32MP15X-EV1 board" + help + builds a single barebox-stm32mp15x-ev1.img that can be deployed + as SSBL on any STM32MP15X-EVAL platform, like the + STM32MP157C-EV1 + endif diff --git a/images/Makefile.stm32mp b/images/Makefile.stm32mp index eafe84a721..3384f5014b 100644 --- a/images/Makefile.stm32mp +++ b/images/Makefile.stm32mp @@ -27,3 +27,8 @@ pblb-$(CONFIG_MACH_SEEED_ODYSSEY) += start_stm32mp157c_seeed_odyssey FILE_barebox-stm32mp157c-seeed-odyssey.img = start_stm32mp157c_seeed_odyssey.pblb.stm32 OPTS_start_stm32mp157c_seeed_odyssey.pblb.stm32 = $(STM32MP1_OPTS) image-$(CONFIG_MACH_SEEED_ODYSSEY) += barebox-stm32mp157c-seeed-odyssey.img + +pblb-$(CONFIG_MACH_STM32MP15X_EV1) += start_stm32mp15x_ev1 +FILE_barebox-stm32mp15x-ev1.img = start_stm32mp15x_ev1.pblb.stm32 +OPTS_start_stm32mp15x_ev1.pblb.stm32 = $(STM32MP1_OPTS) +image-$(CONFIG_MACH_STM32MP15X_EV1) += barebox-stm32mp15x-ev1.img -- cgit v1.2.3 From 6381efc255dc3736f40f85b08339e3942afa62ef Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 16 Mar 2021 09:59:05 +0100 Subject: ARM: stm32mp: defconfig: enable DWC2 USB OTG controller We have had all parts in place to use the OTG port on the STM32MP1 boards for a while now. Enable it in the defconfig. USB EHCI has a driver, but still needs some glue, however. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- arch/arm/configs/stm32mp_defconfig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/configs/stm32mp_defconfig b/arch/arm/configs/stm32mp_defconfig index 7b90002f87..49041b1f48 100644 --- a/arch/arm/configs/stm32mp_defconfig +++ b/arch/arm/configs/stm32mp_defconfig @@ -93,7 +93,6 @@ CONFIG_CMD_TIME=y CONFIG_NET=y CONFIG_NET_NETCONSOLE=y CONFIG_NET_FASTBOOT=y -CONFIG_OFDEVICE=y CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_AIODEV=y CONFIG_STM32_ADC=y @@ -106,6 +105,13 @@ CONFIG_REALTEK_PHY=y # CONFIG_SPI is not set CONFIG_I2C=y CONFIG_I2C_STM32=y +CONFIG_USB_HOST=y +CONFIG_USB_DWC2_HOST=y +CONFIG_USB_DWC2_GADGET=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DFU=y +CONFIG_USB_GADGET_SERIAL=y +CONFIG_USB_GADGET_FASTBOOT=y CONFIG_VIDEO=y CONFIG_DRIVER_VIDEO_BACKLIGHT=y CONFIG_DRIVER_VIDEO_SIMPLE_PANEL=y -- cgit v1.2.3 From 447306739800a2e3403649f665b0806bca7e5777 Mon Sep 17 00:00:00 2001 From: Michael Tretter Date: Thu, 18 Mar 2021 10:22:06 +0100 Subject: dts: zcu104: remove unnecessary ZynqMP clock dtsi The clock definitions are now available from the Linux device tree as dts/src/arm64/xilinx/zynqmp-clk-ccf.dtsi and the clock-controller is defined in dts/src/arm64/xilinx/zynqmp.dtsi. Defining the clocks in a Barebox-specific file is not necessary anymore. Remove zynqmp-clk.dtsi and the include from the board device tree. The files are already correctly included by the imported board device trees (dts/src/arm64/xilinx/zynqmp-zcu104-revA.dts). Signed-off-by: Michael Tretter Signed-off-by: Sascha Hauer --- arch/arm/dts/zynqmp-clk.dtsi | 155 ------------------------------------ arch/arm/dts/zynqmp-zcu104-revA.dts | 1 - 2 files changed, 156 deletions(-) delete mode 100644 arch/arm/dts/zynqmp-clk.dtsi (limited to 'arch') diff --git a/arch/arm/dts/zynqmp-clk.dtsi b/arch/arm/dts/zynqmp-clk.dtsi deleted file mode 100644 index 68ece9aa67..0000000000 --- a/arch/arm/dts/zynqmp-clk.dtsi +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Clock specification for Xilinx ZynqMP - * - * (C) Copyright 2017, Xilinx, Inc. - * - * Michal Simek - */ - -#include - -&zynqmp_firmware { - zynqmp_clk: clock-controller { - #clock-cells = <1>; - compatible = "xlnx,zynqmp-clk"; - clocks = <&pss_ref_clk>, <&video_clk>, <&pss_alt_ref_clk>, <&aux_ref_clk>, <>_crx_ref_clk>; - clock-names = "pss_ref_clk", "video_clk", "pss_alt_ref_clk", "aux_ref_clk", "gt_crx_ref_clk"; - }; -}; - -/ { - pss_ref_clk: pss_ref_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <33333333>; - }; - - video_clk: video_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <27000000>; - }; - - pss_alt_ref_clk: pss_alt_ref_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <0>; - }; - - gt_crx_ref_clk: gt_crx_ref_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <108000000>; - }; - - aux_ref_clk: aux_ref_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <27000000>; - }; -}; - -&can0 { - clocks = <&zynqmp_clk CAN0_REF>, <&zynqmp_clk LPD_LSBUS>; -}; - -&can1 { - clocks = <&zynqmp_clk CAN1_REF>, <&zynqmp_clk LPD_LSBUS>; -}; - -&cpu0 { - clocks = <&zynqmp_clk ACPU>; -}; - -&gem0 { - clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM0_TX>, <&zynqmp_clk GEM0_REF>, <&zynqmp_clk GEM_TSU>; - clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk"; -}; - -&gem1 { - clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM1_TX>, <&zynqmp_clk GEM1_REF>, <&zynqmp_clk GEM_TSU>; - clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk"; -}; - -&gem2 { - clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM2_TX>, <&zynqmp_clk GEM2_REF>, <&zynqmp_clk GEM_TSU>; - clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk"; -}; - -&gem3 { - clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM3_TX>, <&zynqmp_clk GEM3_REF>, <&zynqmp_clk GEM_TSU>; - clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk"; -}; - -&gpio { - clocks = <&zynqmp_clk LPD_LSBUS>; -}; - -&i2c0 { - clocks = <&zynqmp_clk I2C0_REF>; -}; - -&i2c1 { - clocks = <&zynqmp_clk I2C1_REF>; -}; - -&pcie { - clocks = <&zynqmp_clk PCIE_REF>; -}; - -&sata { - clocks = <&zynqmp_clk SATA_REF>; -}; - -&sdhci0 { - clocks = <&zynqmp_clk SDIO0_REF>, <&zynqmp_clk LPD_LSBUS>; -}; - -&sdhci1 { - clocks = <&zynqmp_clk SDIO1_REF>, <&zynqmp_clk LPD_LSBUS>; -}; - -&spi0 { - clocks = <&zynqmp_clk SPI0_REF>, <&zynqmp_clk LPD_LSBUS>; -}; - -&spi1 { - clocks = <&zynqmp_clk SPI0_REF>, <&zynqmp_clk LPD_LSBUS>; -}; - -&ttc0 { - clocks = <&zynqmp_clk LPD_LSBUS>; -}; - -&ttc1 { - clocks = <&zynqmp_clk LPD_LSBUS>; -}; - -&ttc2 { - clocks = <&zynqmp_clk LPD_LSBUS>; -}; - -&ttc3 { - clocks = <&zynqmp_clk LPD_LSBUS>; -}; - -&uart0 { - clocks = <&zynqmp_clk UART0_REF>, <&zynqmp_clk LPD_LSBUS>; -}; - -&uart1 { - clocks = <&zynqmp_clk UART1_REF>, <&zynqmp_clk LPD_LSBUS>; -}; - -&usb0 { - clocks = <&zynqmp_clk USB0_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>; -}; - -&usb1 { - clocks = <&zynqmp_clk USB1_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>; -}; - -&watchdog0 { - clocks = <&zynqmp_clk WDT>; -}; diff --git a/arch/arm/dts/zynqmp-zcu104-revA.dts b/arch/arm/dts/zynqmp-zcu104-revA.dts index 8b8dd84c1d..8c467ee970 100644 --- a/arch/arm/dts/zynqmp-zcu104-revA.dts +++ b/arch/arm/dts/zynqmp-zcu104-revA.dts @@ -8,4 +8,3 @@ */ #include -#include "zynqmp-clk.dtsi" -- cgit v1.2.3