From 4cec057ff96e22019291894c1c3d526dfa57c415 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 6 Aug 2021 11:12:56 +0200 Subject: arm64: zynqmp: Fix node name for ds35/36 leds By dt-binding specs led nodes should have -led suffix that's why add it. Signed-off-by: Michal Simek --- arch/arm/dts/zynqmp-sm-k26-revA.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/dts') diff --git a/arch/arm/dts/zynqmp-sm-k26-revA.dts b/arch/arm/dts/zynqmp-sm-k26-revA.dts index b613ab2342..7289badc2d 100644 --- a/arch/arm/dts/zynqmp-sm-k26-revA.dts +++ b/arch/arm/dts/zynqmp-sm-k26-revA.dts @@ -60,13 +60,13 @@ leds { compatible = "gpio-leds"; - ds35 { + ds35-led { label = "heartbeat"; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; }; - ds36 { + ds36-led { label = "vbus_det"; gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; default-state = "on"; -- cgit v1.2.1 From 464f6558ca7daab476336fcf6b7e3ec0b7fc1e92 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 6 Aug 2021 11:12:29 +0200 Subject: arm64: zynqmp: Fix header alignment on kv260 boards Fix header alignment. Signed-off-by: Michal Simek --- arch/arm/dts/zynqmp-sck-kv-g-revA.dts | 8 ++++---- arch/arm/dts/zynqmp-sck-kv-g-revB.dts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'arch/arm/dts') diff --git a/arch/arm/dts/zynqmp-sck-kv-g-revA.dts b/arch/arm/dts/zynqmp-sck-kv-g-revA.dts index 4e8086c82f..22602d8c33 100644 --- a/arch/arm/dts/zynqmp-sck-kv-g-revA.dts +++ b/arch/arm/dts/zynqmp-sck-kv-g-revA.dts @@ -12,10 +12,10 @@ * Michal Simek */ - #include - #include - #include - #include +#include +#include +#include +#include /dts-v1/; /plugin/; diff --git a/arch/arm/dts/zynqmp-sck-kv-g-revB.dts b/arch/arm/dts/zynqmp-sck-kv-g-revB.dts index 048d5665c5..df054e152a 100644 --- a/arch/arm/dts/zynqmp-sck-kv-g-revB.dts +++ b/arch/arm/dts/zynqmp-sck-kv-g-revB.dts @@ -7,10 +7,10 @@ * Michal Simek */ - #include - #include - #include - #include +#include +#include +#include +#include /dts-v1/; /plugin/; -- cgit v1.2.1 From 1759a3128823942beb48be1306a8d11191aab0f9 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 5 Aug 2021 08:28:46 +0200 Subject: arm64: zynqmp: Update comment style sm-k26 Trivial style patch. Signed-off-by: Michal Simek --- arch/arm/dts/zynqmp-sm-k26-revA.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/dts') diff --git a/arch/arm/dts/zynqmp-sm-k26-revA.dts b/arch/arm/dts/zynqmp-sm-k26-revA.dts index 7289badc2d..e274100a9b 100644 --- a/arch/arm/dts/zynqmp-sm-k26-revA.dts +++ b/arch/arm/dts/zynqmp-sm-k26-revA.dts @@ -183,7 +183,7 @@ }; }; -&sdhci0 { /* MIO13-23 - 16GB emmc MTFC16GAPALBH-IT - U133A*/ +&sdhci0 { /* MIO13-23 - 16GB emmc MTFC16GAPALBH-IT - U133A */ status = "okay"; non-removable; disable-wp; -- cgit v1.2.1 From bc353102a090b93452e9652029d184bc24b4701e Mon Sep 17 00:00:00 2001 From: Raju Kumar Pothuraju Date: Thu, 1 Jul 2021 14:15:11 +0530 Subject: xilinx: Add jedec compatible string for QSPI (Zynq/ZynqMP) Add missing "jedec, spi-nor" compatible string for QSPI flash node. Spi-nor framework uses this compatibility string to probe & initialize flash. With missing compatibility string we are observing below error: Zynq> sf probe 0 0 0 jedec_spi_nor spi_flash@0:0: unrecognized JEDEC id bytes: 00, 00, 00 Failed to initialize SPI flash at 0:0 (error -2) Signed-off-by: Raju Kumar Pothuraju Signed-off-by: Michal Simek --- arch/arm/dts/zynq-cc108.dts | 2 +- arch/arm/dts/zynq-cse-qspi.dtsi | 2 +- arch/arm/dts/zynq-topic-miami.dts | 2 +- arch/arm/dts/zynqmp-topic-miamimp-xilinx-xdp-v1r1.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm/dts') diff --git a/arch/arm/dts/zynq-cc108.dts b/arch/arm/dts/zynq-cc108.dts index 64d73ecbc5..036106e221 100644 --- a/arch/arm/dts/zynq-cc108.dts +++ b/arch/arm/dts/zynq-cc108.dts @@ -58,7 +58,7 @@ is-dual = <0>; num-cs = <1>; flash@0 { /* 16 MB */ - compatible = "n25q128a11"; + compatible = "n25q128a11", "jedec,spi-nor"; reg = <0x0>; spi-max-frequency = <50000000>; spi-tx-bus-width = <1>; diff --git a/arch/arm/dts/zynq-cse-qspi.dtsi b/arch/arm/dts/zynq-cse-qspi.dtsi index eb0e29e6cb..38410eeca8 100644 --- a/arch/arm/dts/zynq-cse-qspi.dtsi +++ b/arch/arm/dts/zynq-cse-qspi.dtsi @@ -60,7 +60,7 @@ #size-cells = <0>; num-cs = <1>; flash0: flash@0 { - compatible = "n25q128a11"; + compatible = "n25q128a11", "jedec,spi-nor"; reg = <0x0>; spi-tx-bus-width = <1>; spi-rx-bus-width = <4>; diff --git a/arch/arm/dts/zynq-topic-miami.dts b/arch/arm/dts/zynq-topic-miami.dts index ab6bde95fe..c4ec56138e 100644 --- a/arch/arm/dts/zynq-topic-miami.dts +++ b/arch/arm/dts/zynq-topic-miami.dts @@ -36,7 +36,7 @@ is-dual = <0>; num-cs = <1>; flash@0 { - compatible = "st,m25p80", "n25q256a"; + compatible = "st,m25p80", "n25q256a", "jedec,spi-nor"; m25p,fast-read; reg = <0x0>; spi-tx-bus-width = <1>; diff --git a/arch/arm/dts/zynqmp-topic-miamimp-xilinx-xdp-v1r1.dts b/arch/arm/dts/zynqmp-topic-miamimp-xilinx-xdp-v1r1.dts index 6ec96e0e8c..300e2ebe96 100644 --- a/arch/arm/dts/zynqmp-topic-miamimp-xilinx-xdp-v1r1.dts +++ b/arch/arm/dts/zynqmp-topic-miamimp-xilinx-xdp-v1r1.dts @@ -58,7 +58,7 @@ status = "okay"; is-dual = <1>; flash@0 { - compatible = "st,m25p80", "n25q256a"; + compatible = "st,m25p80", "n25q256a", "jedec,spi-nor"; m25p,fast-read; reg = <0x0>; spi-tx-bus-width = <1>; -- cgit v1.2.1 From b9c4e8d439ddce576e569acb0880d36002e71448 Mon Sep 17 00:00:00 2001 From: Sai Krishna Potthuri Date: Fri, 6 Aug 2021 01:41:46 -0600 Subject: ARM: zynq: Replace 'io-standard' with 'power-source' property Replace 'io-standard' property with 'power-source' property in all zynq dts files to be in sync with Zynq Pinctrl driver. Signed-off-by: Sai Krishna Potthuri Signed-off-by: Michal Simek --- arch/arm/dts/zynq-zc702.dts | 22 +++++++++++----------- arch/arm/dts/zynq-zc706.dts | 18 +++++++++--------- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'arch/arm/dts') diff --git a/arch/arm/dts/zynq-zc702.dts b/arch/arm/dts/zynq-zc702.dts index 4474f4bfd7..57a47409b9 100644 --- a/arch/arm/dts/zynq-zc702.dts +++ b/arch/arm/dts/zynq-zc702.dts @@ -213,7 +213,7 @@ conf { groups = "can0_9_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; conf-rx { @@ -236,7 +236,7 @@ conf { groups = "ethernet0_0_grp"; slew-rate = <0>; - io-standard = <4>; + power-source = <4>; }; conf-rx { @@ -259,7 +259,7 @@ conf-mdio { groups = "mdio0_0_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; bias-disable; }; }; @@ -277,7 +277,7 @@ "gpio0_10_grp", "gpio0_11_grp", "gpio0_12_grp", "gpio0_13_grp", "gpio0_14_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; conf-pull-up { @@ -301,7 +301,7 @@ groups = "i2c0_10_grp"; bias-pull-up; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; }; @@ -314,7 +314,7 @@ conf { groups = "gpio0_50_grp", "gpio0_51_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; }; @@ -327,7 +327,7 @@ conf { groups = "sdio0_2_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; bias-disable; }; @@ -341,7 +341,7 @@ bias-high-impedance; bias-pull-up; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; mux-wp { @@ -354,7 +354,7 @@ bias-high-impedance; bias-pull-up; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; }; @@ -367,7 +367,7 @@ conf { groups = "uart1_10_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; conf-rx { @@ -390,7 +390,7 @@ conf { groups = "usb0_0_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; conf-rx { diff --git a/arch/arm/dts/zynq-zc706.dts b/arch/arm/dts/zynq-zc706.dts index 84729e9feb..87308c0333 100644 --- a/arch/arm/dts/zynq-zc706.dts +++ b/arch/arm/dts/zynq-zc706.dts @@ -151,7 +151,7 @@ conf { groups = "ethernet0_0_grp"; slew-rate = <0>; - io-standard = <4>; + power-source = <4>; }; conf-rx { @@ -174,7 +174,7 @@ conf-mdio { groups = "mdio0_0_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; bias-disable; }; }; @@ -188,7 +188,7 @@ conf { groups = "gpio0_7_grp", "gpio0_46_grp", "gpio0_47_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; conf-pull-up { @@ -212,7 +212,7 @@ groups = "i2c0_10_grp"; bias-pull-up; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; }; @@ -225,7 +225,7 @@ conf { groups = "sdio0_2_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; bias-disable; }; @@ -239,7 +239,7 @@ bias-high-impedance; bias-pull-up; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; mux-wp { @@ -252,7 +252,7 @@ bias-high-impedance; bias-pull-up; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; }; @@ -265,7 +265,7 @@ conf { groups = "uart1_10_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; conf-rx { @@ -288,7 +288,7 @@ conf { groups = "usb0_0_grp"; slew-rate = <0>; - io-standard = <1>; + power-source = <1>; }; conf-rx { -- cgit v1.2.1 From 0df062bf04c1a530a831ed65f2a53f90645addde Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 6 Aug 2021 13:30:19 +0200 Subject: ARM: zynq: Wire single qspi on couple of boards Single configuration is working fine and no issue to enable it. Signed-off-by: Michal Simek --- arch/arm/dts/zynq-zc702.dts | 8 ++++++++ arch/arm/dts/zynq-zc706.dts | 8 ++++++++ arch/arm/dts/zynq-zc770-xm010.dts | 8 ++++++++ arch/arm/dts/zynq-zc770-xm013.dts | 8 ++++++++ 4 files changed, 32 insertions(+) (limited to 'arch/arm/dts') diff --git a/arch/arm/dts/zynq-zc702.dts b/arch/arm/dts/zynq-zc702.dts index 57a47409b9..f2e05a55b9 100644 --- a/arch/arm/dts/zynq-zc702.dts +++ b/arch/arm/dts/zynq-zc702.dts @@ -409,6 +409,14 @@ &qspi { u-boot,dm-pre-reloc; status = "okay"; + num-cs = <1>; + flash@0 { + compatible = "n25q128a11", "jedec,spi-nor"; + reg = <0x0>; + spi-tx-bus-width = <1>; + spi-rx-bus-width = <4>; + spi-max-frequency = <50000000>; + }; }; &sdhci0 { diff --git a/arch/arm/dts/zynq-zc706.dts b/arch/arm/dts/zynq-zc706.dts index 87308c0333..cb919e4053 100644 --- a/arch/arm/dts/zynq-zc706.dts +++ b/arch/arm/dts/zynq-zc706.dts @@ -307,6 +307,14 @@ &qspi { u-boot,dm-pre-reloc; status = "okay"; + num-cs = <1>; + flash@0 { + compatible = "n25q128a11", "jedec,spi-nor"; + reg = <0x0>; + spi-tx-bus-width = <1>; + spi-rx-bus-width = <4>; + spi-max-frequency = <50000000>; + }; }; &sdhci0 { diff --git a/arch/arm/dts/zynq-zc770-xm010.dts b/arch/arm/dts/zynq-zc770-xm010.dts index c547d7921d..002ff9f7f4 100644 --- a/arch/arm/dts/zynq-zc770-xm010.dts +++ b/arch/arm/dts/zynq-zc770-xm010.dts @@ -62,6 +62,14 @@ &qspi { status = "okay"; + num-cs = <1>; + flash@0 { + compatible = "n25q128a11", "jedec,spi-nor"; + reg = <0x0>; + spi-tx-bus-width = <1>; + spi-rx-bus-width = <4>; + spi-max-frequency = <50000000>; + }; }; &sdhci0 { diff --git a/arch/arm/dts/zynq-zc770-xm013.dts b/arch/arm/dts/zynq-zc770-xm013.dts index 7218ee3ad8..455c8a9610 100644 --- a/arch/arm/dts/zynq-zc770-xm013.dts +++ b/arch/arm/dts/zynq-zc770-xm013.dts @@ -61,6 +61,14 @@ &qspi { status = "okay"; + num-cs = <1>; + flash@0 { + compatible = "n25q128a11", "jedec,spi-nor"; + reg = <0x0>; + spi-tx-bus-width = <1>; + spi-rx-bus-width = <4>; + spi-max-frequency = <50000000>; + }; }; &spi0 { -- cgit v1.2.1 From c2b7244322444ab3f3eb56890192cb02ba200534 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 6 Aug 2021 13:30:11 +0200 Subject: ARM: zynq: Enable smcc and nor for zc770-xm012 Enable cfi flash on zc770-xm012 configuration. Signed-off-by: Michal Simek --- arch/arm/dts/zynq-zc770-xm012.dts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/dts') diff --git a/arch/arm/dts/zynq-zc770-xm012.dts b/arch/arm/dts/zynq-zc770-xm012.dts index 0d001c9161..ccf76e7984 100644 --- a/arch/arm/dts/zynq-zc770-xm012.dts +++ b/arch/arm/dts/zynq-zc770-xm012.dts @@ -53,6 +53,15 @@ }; }; +&nor0 { + status = "okay"; + bank-width = <1>; +}; + +&smcc { + status = "okay"; +}; + &spi1 { status = "okay"; num-cs = <4>; -- cgit v1.2.1 From f28a22d55a5d2f08ad4befb5f27fd00eebc2b85d Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 19 Aug 2021 11:29:41 +0200 Subject: arm64: dts: Make sure that all DTBs are 64bit aligned Start of DTB should be 64bit aligned that's why also make sure that end is also 64bit aligned. It is not required but it is nice thing to do. Signed-off-by: Michal Simek --- arch/arm/dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/dts') diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 537c96bf5b..4d60022e43 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1127,7 +1127,7 @@ dtb-$(CONFIG_TARGET_EA_LPC3250DEVKITV2) += lpc3250-ea3250.dtb targets += $(dtb-y) # Add any required device tree compiler flags here -DTC_FLAGS += +DTC_FLAGS += -a 0x8 PHONY += dtbs dtbs: $(addprefix $(obj)/, $(dtb-y)) -- cgit v1.2.1 From 52ff1626cf4c414c7a2423c443618017eb6e773c Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 11 Aug 2021 14:23:54 +0200 Subject: xilinx: common: Enabling generic function for DT reselection U-Boot support board detection at run time and based on it change DT. This feature is implemented for SOM Kria platforms which contain two eeproms which contain information about SOM module and CC (Carrier card). Full U-Boot starts with minimal DT file defined by CONFIG_DEFAULT_DEVICE_TREE which is available in multi DTB fit image. It is using default setup of board_name variable initializaed to DEVICE_TREE which corresponds to CONFIG_DEFAULT_DEVICE_TREE option. When DTB_RESELECT is enabled board_detection() is called. Keep it your mind that this code is called before relocation. board_detection() is calling xilinx_read_eeprom() which fills board_info (xilinx_board_description) structure which are parsed in board_name_decode(). Based on DT configuration and amount of nvmemX aliases name of the board is composed by concatenating CONFIG_SYS_BOARD "-" "-rev" "-" "-rev" . If CC is not present or more are available it keeps going. When board name is composed and returned from board_name_decode() it is assigned to board_name variable which is used by board_fit_config_name_match() which is called via fdtdec_setup() when it goes over config options in multi dtb FIT image. From practical point of view multi DTB image is key point here which has to contain configs for detected combinations. Unfortunately as of now they have to be full DTBs and DTBOs are not supported. That's why configuration like: config_X { description = "zynqmp-board-cc"; fdt = "board", "cc"; }; needs to be squashed together with: fdtoverlay -o zynqmp-board-cc -i arch/arm/dts/zynqmp-board.dtb \ arch/arm/dts/zynqmp-cc.dtbo and only one dtb is in fit: config_X { description = "zynqmp-board-cc"; fdt = "board-cc"; }; For creating multi DTBs fit image use mkimage -E, e.g.: mkimage -E -f all.its all.dtb When DTB_RESELECT is enabled xilinx_read_eeprom() is called before relocation and it uses calloc for getting a buffer. Because this is dynamic memory it is not relocated that's why xilinx_read_eeprom() is called again as the part of board_init(). This second read with calloc buffer placed in proper position board_late_init_xilinx() can setup u-boot variables as before. Signed-off-by: Michal Simek --- arch/arm/dts/zynqmp-sm-k26-revA.dts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/dts') diff --git a/arch/arm/dts/zynqmp-sm-k26-revA.dts b/arch/arm/dts/zynqmp-sm-k26-revA.dts index e274100a9b..5f55df28f3 100644 --- a/arch/arm/dts/zynqmp-sm-k26-revA.dts +++ b/arch/arm/dts/zynqmp-sm-k26-revA.dts @@ -204,17 +204,20 @@ &i2c1 { status = "okay"; + u-boot,dm-pre-reloc; clock-frequency = <400000>; scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; eeprom: eeprom@50 { /* u46 - also at address 0x58 */ + u-boot,dm-pre-reloc; compatible = "st,24c64", "atmel,24c64"; /* st m24c64 */ reg = <0x50>; /* WP pin EE_WP_EN connected to slg7x644092@68 */ }; eeprom_cc: eeprom@51 { /* required by spec - also at address 0x59 */ + u-boot,dm-pre-reloc; compatible = "st,24c64", "atmel,24c64"; /* st m24c64 */ reg = <0x51>; }; -- cgit v1.2.1