diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-04-16 18:40:52 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-04-16 18:40:52 +0200 |
commit | 711bc44d6119d62009c25658ecdfca3e55d32df0 (patch) | |
tree | d182ca07c87b5dba37025f22d35b65f83ae0526f /arch | |
parent | f079a386bfb4991d71798e92b44a19c6f4f7493e (diff) | |
parent | 409df4c796e04a19c2452e35585c6268fd7f9011 (diff) | |
download | barebox-711bc44d6119d62009c25658ecdfca3e55d32df0.tar.gz barebox-711bc44d6119d62009c25658ecdfca3e55d32df0.tar.xz |
Merge branch 'for-next/zii'
Diffstat (limited to 'arch')
19 files changed, 149 insertions, 574 deletions
diff --git a/arch/arm/boards/zii-common/Makefile b/arch/arm/boards/zii-common/Makefile index fcc5cdf97d..90bdf21e77 100644 --- a/arch/arm/boards/zii-common/Makefile +++ b/arch/arm/boards/zii-common/Makefile @@ -1 +1,2 @@ obj-y += board.o switch-cmd.o pn-fixup.o +bbenv-y += defaultenv-zii-common diff --git a/arch/arm/boards/zii-common/board.c b/arch/arm/boards/zii-common/board.c index 7bd3a6cabc..08e2f8b9bd 100644 --- a/arch/arm/boards/zii-common/board.c +++ b/arch/arm/boards/zii-common/board.c @@ -104,6 +104,8 @@ static int rdu_networkconfig(void) } late_initcall(rdu_networkconfig); +#ifdef CONFIG_PCI_IMX6 + #define I210_CFGWORD_PCIID_157B 0x157b1a11 static int rdu_i210_invm(void) { @@ -136,3 +138,5 @@ static int rdu_i210_invm(void) return 0; } late_initcall(rdu_i210_invm); + +#endif diff --git a/arch/arm/boards/zii-imx51-rdu1/defaultenv-rdu1/boot/net b/arch/arm/boards/zii-common/defaultenv-zii-common/boot/net index 4be8e1e2d7..8b07cbbc99 100644 --- a/arch/arm/boards/zii-imx51-rdu1/defaultenv-rdu1/boot/net +++ b/arch/arm/boards/zii-common/defaultenv-zii-common/boot/net @@ -2,8 +2,13 @@ path="/mnt/tftp" -# clear seat network config -global.linux.bootargs.rdu_network= +# +# Clear seat network config. Some boards don't have that config, so +# check that it is set first +# +if [ -n ${global.linux.bootargs.rdu_network} ]; then + global.linux.bootargs.rdu_network= +fi global.bootm.image="${path}/${global.user}-linux-${global.hostname}" diff --git a/arch/arm/boards/zii-common/switch-cmd.c b/arch/arm/boards/zii-common/switch-cmd.c index 2b9c34bfac..cf5554e2e9 100644 --- a/arch/arm/boards/zii-common/switch-cmd.c +++ b/arch/arm/boards/zii-common/switch-cmd.c @@ -18,23 +18,53 @@ static int do_rdu2_switch_reset(void) { - struct i2c_client client; + struct device_node *np; + struct i2c_client *client; + int ret; u8 reg; - client.adapter = i2c_get_adapter(1); - if (!client.adapter) + np = of_find_compatible_node(NULL, NULL, "zii,rave-wdt"); + if (!np) { + pr_err("No switch watchdog node found\n"); return -ENODEV; + } + + if (!of_device_is_available(np)) { + /* + * If switch watchdog device is not available assume + * it was removed for a reason and switch reset + * command should be a no-op + */ + return 0; + } + + client = of_find_i2c_device_by_node(np); + if (!client) { + pr_err("No switch watchdog I2C device found\n"); + return -ENODEV; + } - /* address of the switch watchdog microcontroller */ - client.addr = 0x38; reg = 0x78; + /* set switch reset time to 100ms */ - i2c_write_reg(&client, 0x0a, ®, 1); + ret = i2c_write_reg(client, 0x0a, ®, 1); + if (ret < 0) { + pr_err("Failed to set switch reset time\n"); + return ret; + } /* reset the switch */ reg = 0x01; - i2c_write_reg(&client, 0x0d, ®, 1); + ret = i2c_write_reg(client, 0x0d, ®, 1); + if (ret < 0) { + pr_err("Failed to reset the switch\n"); + return ret; + } /* issue dummy command to work around firmware bug */ - i2c_read_reg(&client, 0x01, ®, 1); + ret = i2c_read_reg(client, 0x01, ®, 1); + if (ret < 0) { + pr_err("Failed to issue a dummy command\n"); + return ret; + } return 0; } @@ -57,7 +87,8 @@ static int do_rdu1_switch_reset(void) static int do_rave_switch_reset(int argc, char *argv[]) { if (of_machine_is_compatible("zii,imx6q-zii-rdu2") || - of_machine_is_compatible("zii,imx6qp-zii-rdu2")) + of_machine_is_compatible("zii,imx6qp-zii-rdu2") || + of_machine_is_compatible("zii,imx8mq-ultra")) return do_rdu2_switch_reset(); if (of_machine_is_compatible("zii,imx51-rdu1")) diff --git a/arch/arm/boards/zii-imx51-rdu1/board.c b/arch/arm/boards/zii-imx51-rdu1/board.c index 640bb0d1b7..8fdcb76260 100644 --- a/arch/arm/boards/zii-imx51-rdu1/board.c +++ b/arch/arm/boards/zii-imx51-rdu1/board.c @@ -50,6 +50,7 @@ static int zii_rdu1_init(void) BBU_HANDLER_FLAG_DEFAULT | IMX_BBU_FLAG_PARTITION_STARTS_AT_HEADER); + defaultenv_append_directory(defaultenv_zii_common); defaultenv_append_directory(defaultenv_rdu1); return 0; diff --git a/arch/arm/boards/zii-imx6q-rdu2/board.c b/arch/arm/boards/zii-imx6q-rdu2/board.c index d41609bfae..0f298d6a42 100644 --- a/arch/arm/boards/zii-imx6q-rdu2/board.c +++ b/arch/arm/boards/zii-imx6q-rdu2/board.c @@ -128,8 +128,11 @@ static int rdu2_devices_init(void) { struct i2c_client client; - if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") && - !of_machine_is_compatible("zii,imx6qp-zii-rdu2")) + if (of_machine_is_compatible("zii,imx6q-zii-rdu2")) + barebox_set_hostname("rdu2"); + else if (of_machine_is_compatible("zii,imx6qp-zii-rdu2")) + barebox_set_hostname("rdu2p"); + else return 0; client.adapter = i2c_get_adapter(1); @@ -147,13 +150,13 @@ static int rdu2_devices_init(void) i2c_write_reg(&client, 0x2e, ®, 1); } - barebox_set_hostname("rdu2"); - imx6_bbu_internal_spi_i2c_register_handler("SPI", "/dev/m25p0.barebox", BBU_HANDLER_FLAG_DEFAULT); imx6_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc3", 0); + imx6_bbu_internal_mmc_register_handler("SD", "/dev/mmc1", 0); + defaultenv_append_directory(defaultenv_zii_common); defaultenv_append_directory(defaultenv_rdu2); return 0; diff --git a/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/net b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/net deleted file mode 100644 index 4090c2f4a9..0000000000 --- a/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/net +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -path="/mnt/tftp" - -# clear seat network config -global.linux.bootargs.rdu_network= - -global.bootm.image="${path}/${global.user}-linux-${global.hostname}" - -oftree="${path}/${global.user}-oftree-${global.hostname}" -if [ -f "${oftree}" ]; then - global.bootm.oftree="$oftree" -fi - -nfsroot="/home/${global.user}/nfsroot/${global.hostname}" - -ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip - -initramfs="${path}/${global.user}-initramfs-${global.hostname}" -if [ -f "${initramfs}" ]; then - global.bootm.initrd="$initramfs" -else - global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" -fi
\ No newline at end of file diff --git a/arch/arm/boards/zii-imx7d-dev/board.c b/arch/arm/boards/zii-imx7d-dev/board.c index 89f0515306..6b409e23b7 100644 --- a/arch/arm/boards/zii-imx7d-dev/board.c +++ b/arch/arm/boards/zii-imx7d-dev/board.c @@ -33,7 +33,7 @@ static void zii_imx7d_rpu2_init_fec(void) static int zii_imx7d_rpu2_coredevices_init(void) { - if (!of_machine_is_compatible("zii,imx7d-zii-rpu2") && + if (!of_machine_is_compatible("zii,imx7d-rpu2") && !of_machine_is_compatible("zii,imx7d-rmu2")) return 0; @@ -48,3 +48,15 @@ static int zii_imx7d_rpu2_coredevices_init(void) } coredevice_initcall(zii_imx7d_rpu2_coredevices_init); +static int zii_imx7d_dev_init(void) +{ + if (of_machine_is_compatible("zii,imx7d-rpu2")) + barebox_set_hostname("rpu2"); + else if (of_machine_is_compatible("zii,imx7d-rmu2")) + barebox_set_hostname("rmu2"); + + defaultenv_append_directory(defaultenv_zii_common); + + return 0; +} +late_initcall(zii_imx7d_dev_init); diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c index ac455990b0..cfe879c201 100644 --- a/arch/arm/boards/zii-imx8mq-dev/board.c +++ b/arch/arm/boards/zii-imx8mq-dev/board.c @@ -26,16 +26,21 @@ static int zii_imx8mq_dev_init(void) if (!of_machine_is_compatible("zii,imx8mq-ultra")) return 0; - barebox_set_hostname("imx8mq-zii-rdu3"); + if (of_machine_is_compatible("zii,imx8mq-ultra-zest")) + barebox_set_hostname("zest"); + if (of_machine_is_compatible("zii,imx8mq-ultra-rmb3")) + barebox_set_hostname("rmb3"); imx8mq_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc0", BBU_HANDLER_FLAG_DEFAULT); + imx8mq_bbu_internal_mmc_register_handler("SD", "/dev/mmc1", 0); if (bootsource_get_instance() == 0) of_device_enable_path("/chosen/environment-emmc"); else of_device_enable_path("/chosen/environment-sd"); + defaultenv_append_directory(defaultenv_zii_common); defaultenv_append_directory(defaultenv_imx8mq_zii_dev); return 0; @@ -110,6 +115,15 @@ static int zii_imx8mq_dev_fixup_deb_internal(void) /* Refresh the internal aliases list from the patched DT */ of_alias_scan(); + /* + * Disable switch watchdog to make rave_reset_switch a no-op + */ + np = of_find_compatible_node(NULL, NULL, "zii,rave-wdt"); + if (!np) + return -ENODEV; + + of_device_disable(np); + return 0; } diff --git a/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/net b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/net deleted file mode 100644 index 4090c2f4a9..0000000000 --- a/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/net +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -path="/mnt/tftp" - -# clear seat network config -global.linux.bootargs.rdu_network= - -global.bootm.image="${path}/${global.user}-linux-${global.hostname}" - -oftree="${path}/${global.user}-oftree-${global.hostname}" -if [ -f "${oftree}" ]; then - global.bootm.oftree="$oftree" -fi - -nfsroot="/home/${global.user}/nfsroot/${global.hostname}" - -ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip - -initramfs="${path}/${global.user}-initramfs-${global.hostname}" -if [ -f "${initramfs}" ]; then - global.bootm.initrd="$initramfs" -else - global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" -fi
\ No newline at end of file diff --git a/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/network/eth0-discover b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/network/eth0-discover new file mode 100644 index 0000000000..00f3120115 --- /dev/null +++ b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/network/eth0-discover @@ -0,0 +1,4 @@ +#!/bin/sh + +# reset switch to clear DSA config +rave_reset_switch diff --git a/arch/arm/boards/zii-vf610-dev/board.c b/arch/arm/boards/zii-vf610-dev/board.c index 1d10f12f63..6445025b2e 100644 --- a/arch/arm/boards/zii-vf610-dev/board.c +++ b/arch/arm/boards/zii-vf610-dev/board.c @@ -141,6 +141,7 @@ static int zii_vf610_dev_set_hostname(void) } } + defaultenv_append_directory(defaultenv_zii_common); defaultenv_append_directory(defaultenv_zii_vf610_dev); return 0; } @@ -161,6 +162,14 @@ static int zii_vf610_dev_register_bbu(void) return ret; } + ret = vf610_bbu_internal_mmc_register_handler("SD", + "/dev/mmc1", + 0); + if (ret) { + pr_err("Failed to register SD BBU handler\n"); + return ret; + } + return 0; } late_initcall(zii_vf610_dev_register_bbu); @@ -185,4 +194,4 @@ static int zii_vf610_register_emmc_bbu(void) return 0; } -late_initcall(zii_vf610_register_emmc_bbu);
\ No newline at end of file +late_initcall(zii_vf610_register_emmc_bbu); diff --git a/arch/arm/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/dts/imx6qdl-zii-rdu2.dtsi index c31a279048..b593545ffe 100644 --- a/arch/arm/dts/imx6qdl-zii-rdu2.dtsi +++ b/arch/arm/dts/imx6qdl-zii-rdu2.dtsi @@ -292,39 +292,3 @@ }; }; }; - -&gpio3 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_gpio3_hog>; - - usb-emulation { - gpio-hog; - gpios = <19 GPIO_ACTIVE_HIGH>; - output-low; - line-name = "usb-emulation"; - }; - - usb-mode1 { - gpio-hog; - gpios = <20 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "usb-mode1"; - }; - - usb-mode2 { - gpio-hog; - gpios = <23 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "usb-mode2"; - }; -}; - -&iomuxc { - pinctrl_gpio3_hog: gpio3hoggrp { - fsl,pins = < - MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x40000038 - MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x40000038 - MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x40000038 - >; - }; -}; diff --git a/arch/arm/dts/imx7d-zii-rmu2.dts b/arch/arm/dts/imx7d-zii-rmu2.dts index 1d0d631de7..a4116308bf 100644 --- a/arch/arm/dts/imx7d-zii-rmu2.dts +++ b/arch/arm/dts/imx7d-zii-rmu2.dts @@ -4,5 +4,40 @@ * Copyright (C) 2019 Zodiac Inflight Innovations */ -#include "imx7d-zii-rmu2.dtsi" +#include <arm/imx7d-zii-rmu2.dts> #include "imx7d-ddrc.dtsi" + +&ecspi1 { + nor_flash: flash@0 { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "barebox"; + reg = <0x0 0xc0000>; + }; + + partition@c0000 { + label = "barebox-environment"; + reg = <0xc0000 0x40000>; + }; + }; +}; + +&uart4 { + rave-sp { + #address-cells = <1>; + #size-cells = <1>; + + watchdog { + nvmem-cells = <&boot_source>; + nvmem-cell-names = "boot-source"; + }; + + eeprom@a3 { + boot_source: boot-source@83 { + reg = <0x83 1>; + }; + }; + }; +}; diff --git a/arch/arm/dts/imx7d-zii-rmu2.dtsi b/arch/arm/dts/imx7d-zii-rmu2.dtsi deleted file mode 100644 index 7b36b1c0e3..0000000000 --- a/arch/arm/dts/imx7d-zii-rmu2.dtsi +++ /dev/null @@ -1,361 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0 OR MIT) -/* - * Device tree file for ZII's RMU2 board - * - * RMU - Remote Modem Unit - * - * Copyright (C) 2019 Zodiac Inflight Innovations - */ - -/dts-v1/; -#include <dt-bindings/thermal/thermal.h> -#include <arm/imx7d.dtsi> - -/ { - model = "ZII RMU2 Board"; - compatible = "zii,imx7d-rmu2", "fsl,imx7d"; - - chosen { - stdout-path = &uart2; - }; - - gpio-leds { - compatible = "gpio-leds"; - pinctrl-0 = <&pinctrl_leds_debug>; - pinctrl-names = "default"; - - debug { - label = "zii:green:debug1"; - gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "heartbeat"; - }; - }; -}; - -&cpu0 { - arm-supply = <&sw1a_reg>; -}; - -&ecspi1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_ecspi1>; - cs-gpios = <&gpio4 19 GPIO_ACTIVE_HIGH>; - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - spi-max-frequency = <20000000>; - reg = <0>; - #address-cells = <1>; - #size-cells = <1>; - }; -}; - -&fec1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_enet1>; - assigned-clocks = <&clks IMX7D_ENET1_TIME_ROOT_SRC>, - <&clks IMX7D_ENET1_TIME_ROOT_CLK>; - assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>; - assigned-clock-rates = <0>, <100000000>; - phy-mode = "rgmii"; - phy-handle = <&fec1_phy>; - status = "okay"; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - - fec1_phy: phy@0 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_enet1_phy_reset>, - <&pinctrl_enet1_phy_interrupt>; - reg = <0>; - interrupt-parent = <&gpio1>; - interrupts = <2 IRQ_TYPE_LEVEL_LOW>; - reset-gpios = <&gpio5 11 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&i2c1 { - clock-frequency = <100000>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_i2c1>; - status = "okay"; - - pmic: pmic@8 { - compatible = "fsl,pfuze3000"; - reg = <0x08>; - - regulators { - sw1a_reg: sw1a { - regulator-min-microvolt = <700000>; - regulator-max-microvolt = <3300000>; - regulator-boot-on; - regulator-always-on; - regulator-ramp-delay = <6250>; - }; - - sw1c_reg: sw1b { - regulator-min-microvolt = <700000>; - regulator-max-microvolt = <1475000>; - regulator-boot-on; - regulator-always-on; - regulator-ramp-delay = <6250>; - }; - - sw2_reg: sw2 { - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1850000>; - regulator-boot-on; - regulator-always-on; - }; - - sw3a_reg: sw3 { - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1650000>; - regulator-boot-on; - regulator-always-on; - }; - - swbst_reg: swbst { - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5150000>; - }; - - snvs_reg: vsnvs { - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <3000000>; - regulator-boot-on; - regulator-always-on; - }; - - vref_reg: vrefddr { - regulator-boot-on; - regulator-always-on; - }; - - vgen1_reg: vldo1 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - - vgen2_reg: vldo2 { - regulator-min-microvolt = <800000>; - regulator-max-microvolt = <1550000>; - regulator-always-on; - }; - - vgen3_reg: vccsd { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - - vgen4_reg: v33 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - - vgen5_reg: vldo3 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - - vgen6_reg: vldo4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - }; - }; - - eeprom@50 { - compatible = "atmel,24c04"; - reg = <0x50>; - }; - - eeprom@52 { - compatible = "atmel,24c04"; - reg = <0x52>; - }; -}; - -&uart2 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart2>; - assigned-clocks = <&clks IMX7D_UART2_ROOT_SRC>; - assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>; - status = "okay"; -}; - -&uart4 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart4>; - assigned-clocks = <&clks IMX7D_UART4_ROOT_SRC>; - assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; - status = "okay"; - - rave-sp { - compatible = "zii,rave-sp-rdu2"; - current-speed = <1000000>; - #address-cells = <1>; - #size-cells = <1>; - - watchdog { - compatible = "zii,rave-sp-watchdog"; - }; - - eeprom@a3 { - compatible = "zii,rave-sp-eeprom"; - reg = <0xa3 0x4000>; - #address-cells = <1>; - #size-cells = <1>; - zii,eeprom-name = "main-eeprom"; - }; - }; -}; - -&usbotg2 { - dr_mode = "host"; - disable-over-current; - status = "okay"; -}; - -&usdhc1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usdhc1>; - bus-width = <4>; - no-1-8-v; - no-sdio; - keep-power-in-suspend; - status = "okay"; -}; - -&usdhc3 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usdhc3>; - bus-width = <8>; - no-1-8-v; - non-removable; - no-sdio; - no-sd; - keep-power-in-suspend; - status = "okay"; -}; - -&wdog1 { - status = "disabled"; -}; - -&snvs_rtc { - status = "disabled"; -}; - -&snvs_pwrkey { - status = "disabled"; -}; - -&iomuxc { - pinctrl_ecspi1: ecspi1grp { - fsl,pins = < - MX7D_PAD_ECSPI1_SCLK__ECSPI1_SCLK 0x2 - MX7D_PAD_ECSPI1_MOSI__ECSPI1_MOSI 0x2 - MX7D_PAD_ECSPI1_MISO__ECSPI1_MISO 0x2 - MX7D_PAD_ECSPI1_SS0__GPIO4_IO19 0x59 - >; - }; - - pinctrl_enet1: enet1grp { - fsl,pins = < - MX7D_PAD_SD2_CD_B__ENET1_MDIO 0x3 - MX7D_PAD_SD2_WP__ENET1_MDC 0x3 - MX7D_PAD_ENET1_RGMII_TXC__ENET1_RGMII_TXC 0x1 - MX7D_PAD_ENET1_RGMII_TD0__ENET1_RGMII_TD0 0x1 - MX7D_PAD_ENET1_RGMII_TD1__ENET1_RGMII_TD1 0x1 - MX7D_PAD_ENET1_RGMII_TD2__ENET1_RGMII_TD2 0x1 - MX7D_PAD_ENET1_RGMII_TD3__ENET1_RGMII_TD3 0x1 - MX7D_PAD_ENET1_RGMII_TX_CTL__ENET1_RGMII_TX_CTL 0x1 - MX7D_PAD_ENET1_RGMII_RXC__ENET1_RGMII_RXC 0x1 - MX7D_PAD_ENET1_RGMII_RD0__ENET1_RGMII_RD0 0x1 - MX7D_PAD_ENET1_RGMII_RD1__ENET1_RGMII_RD1 0x1 - MX7D_PAD_ENET1_RGMII_RD2__ENET1_RGMII_RD2 0x1 - MX7D_PAD_ENET1_RGMII_RD3__ENET1_RGMII_RD3 0x1 - MX7D_PAD_ENET1_RGMII_RX_CTL__ENET1_RGMII_RX_CTL 0x1 - >; - }; - - pinctrl_enet1_phy_reset: enet1phyresetgrp { - fsl,pins = < - MX7D_PAD_SD2_RESET_B__GPIO5_IO11 0x14 - - >; - }; - - pinctrl_i2c1: i2c1grp { - fsl,pins = < - MX7D_PAD_I2C1_SDA__I2C1_SDA 0x4000007f - MX7D_PAD_I2C1_SCL__I2C1_SCL 0x4000007f - >; - }; - - pinctrl_leds_debug: debuggrp { - fsl,pins = < - MX7D_PAD_EPDC_DATA08__GPIO2_IO8 0x59 - >; - }; - - - pinctrl_uart2: uart2grp { - fsl,pins = < - MX7D_PAD_UART2_RX_DATA__UART2_DCE_RX 0x79 - MX7D_PAD_UART2_TX_DATA__UART2_DCE_TX 0x79 - >; - }; - - pinctrl_uart4: uart4grp { - fsl,pins = < - MX7D_PAD_SD2_DATA0__UART4_DCE_RX 0x79 - MX7D_PAD_SD2_DATA1__UART4_DCE_TX 0x79 - >; - }; - - pinctrl_usdhc1: usdhc1grp { - fsl,pins = < - MX7D_PAD_SD1_CMD__SD1_CMD 0x59 - MX7D_PAD_SD1_CLK__SD1_CLK 0x19 - MX7D_PAD_SD1_DATA0__SD1_DATA0 0x59 - MX7D_PAD_SD1_DATA1__SD1_DATA1 0x59 - MX7D_PAD_SD1_DATA2__SD1_DATA2 0x59 - MX7D_PAD_SD1_DATA3__SD1_DATA3 0x59 - >; - }; - - pinctrl_usdhc3: usdhc3grp { - fsl,pins = < - MX7D_PAD_SD3_CMD__SD3_CMD 0x59 - MX7D_PAD_SD3_CLK__SD3_CLK 0x19 - MX7D_PAD_SD3_DATA0__SD3_DATA0 0x59 - MX7D_PAD_SD3_DATA1__SD3_DATA1 0x59 - MX7D_PAD_SD3_DATA2__SD3_DATA2 0x59 - MX7D_PAD_SD3_DATA3__SD3_DATA3 0x59 - MX7D_PAD_SD3_DATA4__SD3_DATA4 0x59 - MX7D_PAD_SD3_DATA5__SD3_DATA5 0x59 - MX7D_PAD_SD3_DATA6__SD3_DATA6 0x59 - MX7D_PAD_SD3_DATA7__SD3_DATA7 0x59 - MX7D_PAD_SD3_RESET_B__SD3_RESET_B 0x59 - >; - }; -}; - -&iomuxc_lpsr { - pinctrl_enet1_phy_interrupt: enet1phyinterruptgrp { - fsl,phy = < - MX7D_PAD_LPSR_GPIO1_IO02__GPIO1_IO2 0x08 - >; - }; -}; diff --git a/arch/arm/dts/imx7d-zii-rpu2.dts b/arch/arm/dts/imx7d-zii-rpu2.dts index f8d6e89046..168f66c732 100644 --- a/arch/arm/dts/imx7d-zii-rpu2.dts +++ b/arch/arm/dts/imx7d-zii-rpu2.dts @@ -8,15 +8,6 @@ #include "imx7d-ddrc.dtsi" / { - chosen { - /* - * Kernel DTS incorrectly specifies stdout-path as - * &uart1, this can be removed once the fix trickles - * down - */ - stdout-path = &uart2; - }; - aliases { /* * NVMEM device corresponding to EEPROM attached to diff --git a/arch/arm/dts/imx8mq-zii-ultra.dtsi b/arch/arm/dts/imx8mq-zii-ultra.dtsi index 50bad9b1a2..896993a0e2 100644 --- a/arch/arm/dts/imx8mq-zii-ultra.dtsi +++ b/arch/arm/dts/imx8mq-zii-ultra.dtsi @@ -8,8 +8,6 @@ / { chosen { - stdout-path = &uart1; - environment-emmc { compatible = "barebox,environment"; device-path = &usdhc1, "partname:barebox-environment"; @@ -68,12 +66,21 @@ &uart2 { rave-sp { + watchdog { + nvmem-cells = <&boot_source>; + nvmem-cell-names = "boot-source"; + }; + eeprom@a4 { lru_part_number: lru-part-number@21 { reg = <0x21 15>; read-only; }; + boot_source: boot-source@83 { + reg = <0x83 1>; + }; + mac_address_0: mac-address@180 { reg = <0x180 6>; }; @@ -114,4 +121,3 @@ reg = <0xe0000 0x20000>; }; }; - diff --git a/arch/arm/dts/imx8mq.dtsi b/arch/arm/dts/imx8mq.dtsi index e334a15c94..44a86c715a 100644 --- a/arch/arm/dts/imx8mq.dtsi +++ b/arch/arm/dts/imx8mq.dtsi @@ -4,108 +4,11 @@ * Copyright (C) 2017 Pengutronix, Lucas Stach <kernel@pengutronix.de> */ -#include <dt-bindings/reset/imx8mq-reset.h> -#include <dt-bindings/thermal/thermal.h> - / { aliases { - gpio0 = &gpio1; - gpio1 = &gpio2; - gpio2 = &gpio3; - gpio3 = &gpio4; - gpio4 = &gpio5; mmc0 = &usdhc1; mmc1 = &usdhc2; }; - - thermal-zones { - cpu-thermal { - polling-delay-passive = <250>; - polling-delay = <2000>; - thermal-sensors = <&tmu>; - - trips { - cpu_alert0: trip0 { - temperature = <85000>; - hysteresis = <2000>; - type = "passive"; - }; - - cpu_crit0: trip1 { - temperature = <95000>; - hysteresis = <2000>; - type = "critical"; - }; - }; - - cooling-maps { - map0 { - trip = <&cpu_alert0>; - cooling-device = <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; - }; - }; - }; - }; - - soc@0 { - bus@30000000 { - tmu: tmu@30260000 { - compatible = "fsl,imx8mq-tmu"; - reg = <0x30260000 0x10000>; - interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; - little-endian; - fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; - fsl,tmu-calibration = <0x00000000 0x00000023 - 0x00000001 0x00000029 - 0x00000002 0x0000002f - 0x00000003 0x00000035 - 0x00000004 0x0000003d - 0x00000005 0x00000043 - 0x00000006 0x0000004b - 0x00000007 0x00000051 - 0x00000008 0x00000057 - 0x00000009 0x0000005f - 0x0000000a 0x00000067 - 0x0000000b 0x0000006f - - 0x00010000 0x0000001b - 0x00010001 0x00000023 - 0x00010002 0x0000002b - 0x00010003 0x00000033 - 0x00010004 0x0000003b - 0x00010005 0x00000043 - 0x00010006 0x0000004b - 0x00010007 0x00000055 - 0x00010008 0x0000005d - 0x00010009 0x00000067 - 0x0001000a 0x00000070 - - 0x00020000 0x00000017 - 0x00020001 0x00000023 - 0x00020002 0x0000002d - 0x00020003 0x00000037 - 0x00020004 0x00000041 - 0x00020005 0x0000004b - 0x00020006 0x00000057 - 0x00020007 0x00000063 - 0x00020008 0x0000006f - - 0x00030000 0x00000015 - 0x00030001 0x00000021 - 0x00030002 0x0000002d - 0x00030003 0x00000039 - 0x00030004 0x00000045 - 0x00030005 0x00000053 - 0x00030006 0x0000005f - 0x00030007 0x00000071>; - #thermal-sensor-cells = <0>; - }; - }; - }; -}; - -&A53_0 { - #cooling-cells = <2>; }; &clk { @@ -114,7 +17,7 @@ <&clk IMX8MQ_CLK_ENET_AXI>, <&clk IMX8MQ_CLK_ENET_TIMER>, <&clk IMX8MQ_CLK_ENET_REF>; - + assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_400M>, <&clk IMX8MQ_SYS1_PLL_400M>, <&clk IMX8MQ_SYS1_PLL_266M>, diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 116761bdad..072c659008 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -484,6 +484,7 @@ config MACH_ZII_VF610_DEV bool "ZII VF610 Dev Family" select ARCH_VF610 select CLKDEV_LOOKUP + select MACH_ZII_COMMON select ARM_USE_COMPRESSED_DTB config MACH_ZII_IMX7D_DEV |