Skip to contentSkip to conversation

add basic driver support for broadcom NS3 soc

PATCH New Rayagonda Kokatanur 7 participants 53 messages May 17, 2020 – Jun 8, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover add basic driver support for broadcom NS3 soc

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

This patch set will add following,
-dt nodes and defconfig options for basic device like pinctrl,
gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

Pramod Kumar (2):
arm: dts: ns3: add emmc node
arm: dts: ns3: add sp805 watchdog node

Rayagonda Kokatanur (12):
configs: ns3: enable pinctrl driver
dt-bindings: pinctrl: add ns3 pads definition
arm: dts: ns3: add pinctrl node
arm: dts: ns3: add gpio node
configs: ns3: enable BCM IPROC mmc driver
configs: ns3: enable mmc commands
arm: dts: ns3: add qspi node
arm: dts: ns3: add i2c node
configs: ns3: enable gpt commands
configs: ns3: enable EXT4 and FAT fs support
configs: ns3: enable sp805 watchdog driver
board: ns3: start sp805 watchdog service

Srinath Mannam (1):
arm: dts: ns3: add PAXB PCIe host and phy node

 arch/arm/dts/ns3-board.dts                    |  58 ++++
 arch/arm/dts/ns3-pinctrl.dtsi                 | 321 ++++++++++++++++++
 arch/arm/dts/ns3.dtsi                         | 224 ++++++++++++
 board/broadcom/bcmns3/ns3.c                   |  56 +++
 configs/bcm_ns3_defconfig                     |  19 ++
 .../dt-bindings/pinctrl/brcm,pinctrl-ns3.h    |  41 +++
 6 files changed, 719 insertions(+)
 create mode 100644 arch/arm/dts/ns3-pinctrl.dtsi
 create mode 100644 include/dt-bindings/pinctrl/brcm,pinctrl-ns3.h
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/15 configs: ns3: enable pinctrl driver

Enable pinctrl driver for ns3.

---
 configs/bcm_ns3_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/bcm_ns3_defconfig +3 -0
index 9adb44cb51..328b0e2b4e 100644
@@ -14,12 +14,15 @@ CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="u-boot> "
 CONFIG_SYS_XTRACE="n"
+# CONFIG_CMD_PINMUX is not set
 # CONFIG_CMD_SOURCE is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="ns3-board"
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_CCF=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_SINGLE=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPL_OF_LIBFDT=y
Signature · 1 line
2.17.1
#3 lore raw

PATCH 2/15 dt-bindings: pinctrl: add ns3 pads definition

In reply to Rayagonda Kokatanur

Add NS3 pads definitions.

---
 .../dt-bindings/pinctrl/brcm,pinctrl-ns3.h    | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 include/dt-bindings/pinctrl/brcm,pinctrl-ns3.h
include/dt-bindings/pinctrl/brcm,pinctrl-ns3.h new file +41 -0
new file mode 100644
index 0000000000..81ebd58ca5
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Broadcom.
+ */
+
+#ifndef __DT_BINDINGS_PINCTRL_BRCM_STINGRAY_H__
+#define __DT_BINDINGS_PINCTRL_BRCM_STINGRAY_H__
+
+/* Alternate functions available in MUX controller */
+#define MODE_NITRO				0
+#define MODE_NAND				1
+#define MODE_PNOR				2
+#define MODE_GPIO				3
+
+/* Pad configuration attribute */
+#define PAD_SLEW_RATE_ENA			BIT(0)
+#define PAD_SLEW_RATE_ENA_MASK			BIT(0)
+
+#define PAD_DRIVE_STRENGTH_2_MA			(0 << 1)
+#define PAD_DRIVE_STRENGTH_4_MA			BIT(1)
+#define PAD_DRIVE_STRENGTH_6_MA			(2 << 1)
+#define PAD_DRIVE_STRENGTH_8_MA			(3 << 1)
+#define PAD_DRIVE_STRENGTH_10_MA		(4 << 1)
+#define PAD_DRIVE_STRENGTH_12_MA		(5 << 1)
+#define PAD_DRIVE_STRENGTH_14_MA		(6 << 1)
+#define PAD_DRIVE_STRENGTH_16_MA		(7 << 1)
+#define PAD_DRIVE_STRENGTH_MASK			(7 << 1)
+
+#define PAD_PULL_UP_ENA				BIT(4)
+#define PAD_PULL_UP_ENA_MASK			BIT(4)
+
+#define PAD_PULL_DOWN_ENA			BIT(5)
+#define PAD_PULL_DOWN_ENA_MASK			BIT(5)
+
+#define PAD_INPUT_PATH_DIS			BIT(6)
+#define PAD_INPUT_PATH_DIS_MASK			BIT(6)
+
+#define PAD_HYSTERESIS_ENA			BIT(7)
+#define PAD_HYSTERESIS_ENA_MASK			BIT(7)
+
+#endif
Signature · 1 line
2.17.1
#5 lore raw

PATCH 3/15 arm: dts: ns3: add pinctrl node

In reply to Rayagonda Kokatanur

Add pinctrl dt node for ns3.

---
 arch/arm/dts/ns3-pinctrl.dtsi | 321 ++++++++++++++++++++++++++++++++++
 arch/arm/dts/ns3.dtsi         |   2 +
 2 files changed, 323 insertions(+)
 create mode 100644 arch/arm/dts/ns3-pinctrl.dtsi
arch/arm/dts/ns3-pinctrl.dtsi new file +321 -0
new file mode 100644
index 0000000000..dfc13c7014
@@ -0,0 +1,321 @@
+// SPDX-License-Identifier:      GPL-2.0+
+/*
+ * Copyright (C) 2020 Broadcom
+ */
+
+#include <dt-bindings/pinctrl/brcm,pinctrl-ns3.h>
+
+		pinconf: pinconf at 140000 {
+			compatible = "pinconf-single";
+			reg = <0x00140000 0x250>;
+			pinctrl-single,register-width = <32>;
+
+			/* pinconf functions */
+		};
+
+		pinmux: pinmux at 14029c {
+			ranges;
+			compatible = "pinctrl-single";
+			reg = <0x0014029c 0x250>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			pinctrl-single,register-width = <32>;
+			pinctrl-single,function-mask = <0xf>;
+
+			pinctrl-single,gpio-range = <
+				&range 0  91 MODE_GPIO
+				&range 95 60 MODE_GPIO
+				>;
+			range: gpio-range {
+				#pinctrl-single,gpio-range-cells = <3>;
+			};
+
+			/* pinctrl functions */
+			tsio_pins: pinmux_gpio_14 {
+				pinctrl-single,pins = <
+					0x038 MODE_NITRO /* tsio_0 */
+					0x03c MODE_NITRO /* tsio_1 */
+				>;
+			};
+
+			nor_pins: pinmux_pnor_adv_n {
+				pinctrl-single,pins = <
+					0x0ac MODE_PNOR /* nand_ce1_n */
+					0x0b0 MODE_PNOR /* nand_ce0_n */
+					0x0b4 MODE_PNOR /* nand_we_n */
+					0x0b8 MODE_PNOR /* nand_wp_n */
+					0x0bc MODE_PNOR /* nand_re_n */
+					0x0c0 MODE_PNOR /* nand_rdy_bsy_n */
+					0x0c4 MODE_PNOR /* nand_io0_0 */
+					0x0c8 MODE_PNOR /* nand_io1_0 */
+					0x0cc MODE_PNOR /* nand_io2_0 */
+					0x0d0 MODE_PNOR /* nand_io3_0 */
+					0x0d4 MODE_PNOR /* nand_io4_0 */
+					0x0d8 MODE_PNOR /* nand_io5_0 */
+					0x0dc MODE_PNOR /* nand_io6_0 */
+					0x0e0 MODE_PNOR /* nand_io7_0 */
+					0x0e4 MODE_PNOR /* nand_io8_0 */
+					0x0e8 MODE_PNOR /* nand_io9_0 */
+					0x0ec MODE_PNOR /* nand_io10_0 */
+					0x0f0 MODE_PNOR /* nand_io11_0 */
+					0x0f4 MODE_PNOR /* nand_io12_0 */
+					0x0f8 MODE_PNOR /* nand_io13_0 */
+					0x0fc MODE_PNOR /* nand_io14_0 */
+					0x100 MODE_PNOR /* nand_io15_0 */
+					0x104 MODE_PNOR /* nand_ale_0 */
+					0x108 MODE_PNOR /* nand_cle_0 */
+					0x040 MODE_PNOR /* pnor_adv_n */
+					0x044 MODE_PNOR /* pnor_baa_n */
+					0x048 MODE_PNOR /* pnor_bls_0_n */
+					0x04c MODE_PNOR /* pnor_bls_1_n */
+					0x050 MODE_PNOR /* pnor_cre */
+					0x054 MODE_PNOR /* pnor_cs_2_n */
+					0x058 MODE_PNOR /* pnor_cs_1_n */
+					0x05c MODE_PNOR /* pnor_cs_0_n */
+					0x060 MODE_PNOR /* pnor_we_n */
+					0x064 MODE_PNOR /* pnor_oe_n */
+					0x068 MODE_PNOR /* pnor_intr */
+					0x06c MODE_PNOR /* pnor_dat_0 */
+					0x070 MODE_PNOR /* pnor_dat_1 */
+					0x074 MODE_PNOR /* pnor_dat_2 */
+					0x078 MODE_PNOR /* pnor_dat_3 */
+					0x07c MODE_PNOR /* pnor_dat_4 */
+					0x080 MODE_PNOR /* pnor_dat_5 */
+					0x084 MODE_PNOR /* pnor_dat_6 */
+					0x088 MODE_PNOR /* pnor_dat_7 */
+					0x08c MODE_PNOR /* pnor_dat_8 */
+					0x090 MODE_PNOR /* pnor_dat_9 */
+					0x094 MODE_PNOR /* pnor_dat_10 */
+					0x098 MODE_PNOR /* pnor_dat_11 */
+					0x09c MODE_PNOR /* pnor_dat_12 */
+					0x0a0 MODE_PNOR /* pnor_dat_13 */
+					0x0a4 MODE_PNOR /* pnor_dat_14 */
+					0x0a8 MODE_PNOR /* pnor_dat_15 */
+				>;
+			};
+
+			nand_pins: pinmux_nand_ce1_n {
+				pinctrl-single,pins = <
+					0x0ac MODE_NAND /* nand_ce1_n */
+					0x0b0 MODE_NAND /* nand_ce0_n */
+					0x0b4 MODE_NAND /* nand_we_n */
+					0x0b8 MODE_NAND /* nand_wp_n */
+					0x0bc MODE_NAND /* nand_re_n */
+					0x0c0 MODE_NAND /* nand_rdy_bsy_n */
+					0x0c4 MODE_NAND /* nand_io0_0 */
+					0x0c8 MODE_NAND /* nand_io1_0 */
+					0x0cc MODE_NAND /* nand_io2_0 */
+					0x0d0 MODE_NAND /* nand_io3_0 */
+					0x0d4 MODE_NAND /* nand_io4_0 */
+					0x0d8 MODE_NAND /* nand_io5_0 */
+					0x0dc MODE_NAND /* nand_io6_0 */
+					0x0e0 MODE_NAND /* nand_io7_0 */
+					0x0e4 MODE_NAND /* nand_io8_0 */
+					0x0e8 MODE_NAND /* nand_io9_0 */
+					0x0ec MODE_NAND /* nand_io10_0 */
+					0x0f0 MODE_NAND /* nand_io11_0 */
+					0x0f4 MODE_NAND /* nand_io12_0 */
+					0x0f8 MODE_NAND /* nand_io13_0 */
+					0x0fc MODE_NAND /* nand_io14_0 */
+					0x100 MODE_NAND /* nand_io15_0 */
+					0x104 MODE_NAND /* nand_ale_0 */
+					0x108 MODE_NAND /* nand_cle_0 */
+				>;
+			};
+
+			pwm0_pins: pinmux_pwm_0 {
+				pinctrl-single,pins = <
+					0x10c MODE_NITRO
+				>;
+			};
+
+			pwm1_pins: pinmux_pwm_1 {
+				pinctrl-single,pins = <
+					0x110 MODE_NITRO
+				>;
+			};
+
+			pwm2_pins: pinmux_pwm_2 {
+				pinctrl-single,pins = <
+					0x114 MODE_NITRO
+				>;
+			};
+
+			pwm3_pins: pinmux_pwm_3 {
+				pinctrl-single,pins = <
+					0x118 MODE_NITRO
+				>;
+			};
+
+			dbu_rxd_pins: pinmux_uart1_sin_nitro {
+				pinctrl-single,pins = <
+					0x11c MODE_NITRO /* dbu_rxd */
+					0x120 MODE_NITRO /* dbu_txd */
+				>;
+			};
+
+			uart1_pins: pinmux_uart1_sin_nand {
+				pinctrl-single,pins = <
+					0x11c MODE_NAND /* uart1_sin */
+					0x120 MODE_NAND /* uart1_out */
+				>;
+			};
+
+			uart2_pins: pinmux_uart2_sin {
+				pinctrl-single,pins = <
+					0x124 MODE_NITRO /* uart2_sin */
+					0x128 MODE_NITRO /* uart2_out */
+				>;
+			};
+
+			uart3_pins: pinmux_uart3_sin {
+				pinctrl-single,pins = <
+					0x12c MODE_NITRO /* uart3_sin */
+					0x130 MODE_NITRO /* uart3_out */
+				>;
+			};
+
+			i2s_pins: pinmux_i2s_bitclk {
+				pinctrl-single,pins = <
+					0x134 MODE_NITRO /* i2s_bitclk */
+					0x138 MODE_NITRO /* i2s_sdout */
+					0x13c MODE_NITRO /* i2s_sdin */
+					0x140 MODE_NITRO /* i2s_ws */
+					0x144 MODE_NITRO /* i2s_mclk */
+					0x148 MODE_NITRO /* i2s_spdif_out */
+				>;
+			};
+
+			qspi_pins: pinumx_qspi_hold_n {
+				pinctrl-single,pins = <
+					0x14c MODE_NAND /* qspi_hold_n */
+					0x150 MODE_NAND /* qspi_wp_n */
+					0x154 MODE_NAND /* qspi_sck */
+					0x158 MODE_NAND /* qspi_cs_n */
+					0x15c MODE_NAND /* qspi_mosi */
+					0x160 MODE_NAND /* qspi_miso */
+				>;
+			};
+
+			mdio_pins: pinumx_ext_mdio {
+				pinctrl-single,pins = <
+					0x164 MODE_NITRO /* ext_mdio */
+					0x168 MODE_NITRO /* ext_mdc */
+				>;
+			};
+
+			i2c0_pins: pinmux_i2c0_sda {
+				pinctrl-single,pins = <
+					0x16c MODE_NITRO /* i2c0_sda */
+					0x170 MODE_NITRO /* i2c0_scl */
+				>;
+			};
+
+			i2c1_pins: pinmux_i2c1_sda {
+				pinctrl-single,pins = <
+					0x174 MODE_NITRO /* i2c1_sda */
+					0x178 MODE_NITRO /* i2c1_scl */
+				>;
+			};
+
+			sdio0_pins: pinmux_sdio0_cd_l {
+				pinctrl-single,pins = <
+					0x17c MODE_NITRO /* sdio0_cd_l */
+					0x180 MODE_NITRO /* sdio0_clk_sdcard */
+					0x184 MODE_NITRO /* sdio0_data0 */
+					0x188 MODE_NITRO /* sdio0_data1 */
+					0x18c MODE_NITRO /* sdio0_data2 */
+					0x190 MODE_NITRO /* sdio0_data3 */
+					0x194 MODE_NITRO /* sdio0_data4 */
+					0x198 MODE_NITRO /* sdio0_data5 */
+					0x19c MODE_NITRO /* sdio0_data6 */
+					0x1a0 MODE_NITRO /* sdio0_data7 */
+					0x1a4 MODE_NITRO /* sdio0_cmd */
+					0x1a8 MODE_NITRO /* sdio0_emmc_rst_n */
+					0x1ac MODE_NITRO /* sdio0_led_on */
+					0x1b0 MODE_NITRO /* sdio0_wp */
+				>;
+			};
+
+			sdio1_pins: pinmux_sdio1_cd_l {
+				pinctrl-single,pins = <
+					0x1b4 MODE_NITRO /* sdio1_cd_l */
+					0x1b8 MODE_NITRO /* sdio1_clk_sdcard */
+					0x1bc MODE_NITRO /* sdio1_data0 */
+					0x1c0 MODE_NITRO /* sdio1_data1 */
+					0x1c4 MODE_NITRO /* sdio1_data2 */
+					0x1c8 MODE_NITRO /* sdio1_data3 */
+					0x1cc MODE_NITRO /* sdio1_data4 */
+					0x1d0 MODE_NITRO /* sdio1_data5 */
+					0x1d4 MODE_NITRO /* sdio1_data6 */
+					0x1d8 MODE_NITRO /* sdio1_data7 */
+					0x1dc MODE_NITRO /* sdio1_cmd */
+					0x1e0 MODE_NITRO /* sdio1_emmc_rst_n */
+					0x1e4 MODE_NITRO /* sdio1_led_on */
+					0x1e8 MODE_NITRO /* sdio1_wp */
+				>;
+			};
+
+			spi0_pins: pinmux_spi0_sck_nand {
+				pinctrl-single,pins = <
+					0x1ec MODE_NITRO /* spi0_sck */
+					0x1f0 MODE_NITRO /* spi0_rxd */
+					0x1f4 MODE_NITRO /* spi0_fss */
+					0x1f8 MODE_NITRO /* spi0_txd */
+				>;
+			};
+
+			spi1_pins: pinmux_spi1_sck_nand {
+				pinctrl-single,pins = <
+					0x1fc MODE_NITRO /* spi1_sck */
+					0x200 MODE_NITRO /* spi1_rxd */
+					0x204 MODE_NITRO /* spi1_fss */
+					0x208 MODE_NITRO /* spi1_txd */
+				>;
+			};
+
+			nuart_pins: pinmux_uart0_sin_nitro {
+				pinctrl-single,pins = <
+					0x20c MODE_NITRO /* nuart_rxd */
+					0x210 MODE_NITRO /* nuart_txd */
+				>;
+			};
+
+			uart0_pins: pinumux_uart0_sin_nand {
+				pinctrl-single,pins = <
+					0x20c MODE_NAND /* uart0_sin */
+					0x210 MODE_NAND /* uart0_out */
+					0x214 MODE_NAND /* uart0_rts */
+					0x218 MODE_NAND /* uart0_cts */
+					0x21c MODE_NAND /* uart0_dtr */
+					0x220 MODE_NAND /* uart0_dcd */
+					0x224 MODE_NAND /* uart0_dsr */
+					0x228 MODE_NAND /* uart0_ri */
+				>;
+			};
+
+			drdu2_pins: pinmux_drdu2_overcurrent {
+				pinctrl-single,pins = <
+					0x22c MODE_NITRO /* drdu2_overcurrent */
+					0x230 MODE_NITRO /* drdu2_vbus_ppc */
+					0x234 MODE_NITRO /* drdu2_vbus_present */
+					0x238 MODE_NITRO /* drdu2_id */
+				>;
+			};
+
+			drdu3_pins: pinmux_drdu3_overcurrent {
+				pinctrl-single,pins = <
+					0x23c MODE_NITRO /* drdu3_overcurrent */
+					0x240 MODE_NITRO /* drdu3_vbus_ppc */
+					0x244 MODE_NITRO /* drdu3_vbus_present */
+					0x248 MODE_NITRO /* drdu3_id */
+				>;
+			};
+
+			usb3h_pins: pinmux_usb3h_overcurrent {
+				pinctrl-single,pins = <
+					0x24c MODE_NITRO /* usb3h_overcurrent */
+					0x250 MODE_NITRO /* usb3h_vbus_ppc */
+				>;
+			};
+		};
arch/arm/dts/ns3.dtsi +2 -0
index 09098aac3a..a21455515d 100644
@@ -23,6 +23,8 @@
 		#size-cells = <1>;
 		ranges = <0x0 0x0 0x68900000 0x17700000>;
 
+		#include "ns3-pinctrl.dtsi"
+
 		uart1: uart at 110000 {
 			compatible = "snps,dw-apb-uart";
 			reg = <0x00110000 0x1000>;
Signature · 1 line
2.17.1
#6 lore raw

PATCH 3/15 arm: dts: ns3: add pinctrl node

Hi,

Quoted 10 lines · Rayagonda Kokatanur

Add pinctrl dt node for ns3.

---
 arch/arm/dts/ns3-pinctrl.dtsi | 321 ++++++++++++++++++++++++++++++++++
 arch/arm/dts/ns3.dtsi         |   2 +
 2 files changed, 323 insertions(+)
 create mode 100644 arch/arm/dts/ns3-pinctrl.dtsi

Can you please mention the linux version this came from. Also I cannot find this file - are you sure you are using the same filename as Linux?

Regards,
Simon

#7 lore raw

PATCH 3/15 arm: dts: ns3: add pinctrl node

Hi Simon,

Quoted 16 lines · Simon Glass

Hi,

Quoted 10 lines · Rayagonda Kokatanur

Add pinctrl dt node for ns3.

---
 arch/arm/dts/ns3-pinctrl.dtsi | 321 ++++++++++++++++++++++++++++++++++
 arch/arm/dts/ns3.dtsi         |   2 +
 2 files changed, 323 insertions(+)
 create mode 100644 arch/arm/dts/ns3-pinctrl.dtsi
Quoted 5 lines

Can you please mention the linux version this came from. Also I cannot find this file - are you sure you are using the same filename as Linux?

Linux 5.6
In Linux file name different, it is - arch/arm64/boot/dts/broadcom/stingray/stingray-pinctrl.dtsi

Best regards,
Rayagonda

Quoted 3 lines

Regards,
Simon

#8 lore raw

PATCH 3/15 arm: dts: ns3: add pinctrl node

Hi Rayagonda,

Quoted 20 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 16 lines · Simon Glass

Hi,

Quoted 10 lines · Rayagonda Kokatanur

Add pinctrl dt node for ns3.

---
 arch/arm/dts/ns3-pinctrl.dtsi | 321 ++++++++++++++++++++++++++++++++++
 arch/arm/dts/ns3.dtsi         |   2 +
 2 files changed, 323 insertions(+)
 create mode 100644 arch/arm/dts/ns3-pinctrl.dtsi
Quoted 8 lines
Quoted 5 lines

Can you please mention the linux version this came from. Also I cannot find this file - are you sure you are using the same filename as Linux?

Linux 5.6
In Linux file name different, it is - arch/arm64/boot/dts/broadcom/stingray/stingray-pinctrl.dtsi

OK. Please use the same filename and file contents here or it will get very confusing!

Regards,
Simon

#9 lore raw

PATCH 4/15 arm: dts: ns3: add gpio node

In reply to Rayagonda Kokatanur

Add IPROC GPIO node for NS3.

---
 arch/arm/dts/ns3-board.dts |  1 +
 arch/arm/dts/ns3.dtsi      | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)
arch/arm/dts/ns3-board.dts +1 -0
index c660e74dc8..5926123379 100644
@@ -35,6 +35,7 @@
 
 	aliases {
 		serial0 = &uart1;
+		gpio0 = &gpio_hsls;
 	};
 
 	chosen {
arch/arm/dts/ns3.dtsi +23 -0
index a21455515d..84464add9a 100644
@@ -32,5 +32,28 @@
 			clock-frequency = <25000000>;
 			status = "disabled";
 		};
+
+		gpio_hsls: gpio at d0000 {
+			compatible = "brcm,iproc-gpio";
+			reg = <0x000d0000 0x864>;
+			ngpios = <151>;
+			#gpio-cells = <2>;
+			gpio-controller;
+			gpio-ranges = <&pinmux 0 0 16>,
+					<&pinmux 16 71 2>,
+					<&pinmux 18 131 8>,
+					<&pinmux 26 83 6>,
+					<&pinmux 32 123 4>,
+					<&pinmux 36 43 24>,
+					<&pinmux 60 89 2>,
+					<&pinmux 62 73 4>,
+					<&pinmux 66 95 28>,
+					<&pinmux 94 127 4>,
+					<&pinmux 98 139 10>,
+					<&pinmux 108 16 27>,
+					<&pinmux 135 77 6>,
+					<&pinmux 141 67 4>,
+					<&pinmux 145 149 6>;
+		};
 	};
 };
Signature · 1 line
2.17.1
#10 lore raw

PATCH 4/15 arm: dts: ns3: add gpio node

Hi Rayagonda,

Quoted 8 lines · Rayagonda Kokatanur

Add IPROC GPIO node for NS3.

---
 arch/arm/dts/ns3-board.dts |  1 +
 arch/arm/dts/ns3.dtsi      | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)

If you are adding the device tree, just bring in the file all at once.

Regards,
Simon

#11 lore raw

PATCH 4/15 arm: dts: ns3: add gpio node

Hi Simon,

Quoted 14 lines · Simon Glass

Hi Rayagonda,

Quoted 8 lines · Rayagonda Kokatanur

Add IPROC GPIO node for NS3.

---
 arch/arm/dts/ns3-board.dts |  1 +
 arch/arm/dts/ns3.dtsi      | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)
Quoted 3 lines

If you are adding the device tree, just bring in the file all at once.

Thank you for your review and suggestions.
I will remove all dt patches and push it as a single patch.

Best Regards
Rayagonda

Quoted 3 lines

Regards,
Simon

#12 lore raw

PATCH 5/15 configs: ns3: enable BCM IPROC mmc driver

In reply to Rayagonda Kokatanur

Enable BCM IPROC mmc driver ns3.
Enable DMA for MMC Host to have better reads and writes.

---
 configs/bcm_ns3_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
configs/bcm_ns3_defconfig +4 -0
index 328b0e2b4e..432237b56d 100644
@@ -21,6 +21,10 @@ CONFIG_DEFAULT_DEVICE_TREE="ns3-board"
 CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_CCF=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
+CONFIG_MMC_SDHCI_IPROC=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_DM_SERIAL=y
Signature · 1 line
2.17.1
#14 lore raw

PATCH 6/15 arm: dts: ns3: add emmc node

In reply to Rayagonda Kokatanur

From: Pramod Kumar <[email protected]>

Add emmc dt nodes for ns3.

---
 arch/arm/dts/ns3-board.dts |  4 ++++
 arch/arm/dts/ns3.dtsi      | 18 ++++++++++++++++++
 2 files changed, 22 insertions(+)
arch/arm/dts/ns3-board.dts +4 -0
index 5926123379..45565c9c73 100644
@@ -46,3 +46,7 @@
 &uart1 {
 	status = "okay";
 };
+
+&sdio0 {
+	status = "okay";
+};
arch/arm/dts/ns3.dtsi +18 -0
index 84464add9a..7f94b922fc 100644
@@ -33,6 +33,24 @@
 			status = "disabled";
 		};
 
+		sdio0: sdhci at 3f1000 {
+			compatible = "brcm,iproc-sdhci";
+			reg = <0x003f1000 0x100>;
+			bus-width = <8>;
+			clock-freq-min-max = <400000 200000000>;
+			index = <0>;
+			status = "disabled";
+		};
+
+		sdio1: sdhci at 3f2000 {
+			compatible = "brcm,iproc-sdhci";
+			reg = <0x003f2000 0x100>;
+			bus-width = <8>;
+			clock-freq-min-max = <400000 200000000>;
+			index = <1>;
+			status = "disabled";
+		};
+
 		gpio_hsls: gpio at d0000 {
 			compatible = "brcm,iproc-gpio";
 			reg = <0x000d0000 0x864>;
Signature · 1 line
2.17.1
#16 lore raw

PATCH 7/15 configs: ns3: enable mmc commands

In reply to Rayagonda Kokatanur

Enable mmc commands for NS3.

---
 configs/bcm_ns3_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/bcm_ns3_defconfig +2 -0
index 432237b56d..a1ee866e54 100644
@@ -14,6 +14,8 @@ CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="u-boot> "
 CONFIG_SYS_XTRACE="n"
+CONFIG_CMD_MMC=y
+CONFIG_CMD_MMC_SWRITE=y
 # CONFIG_CMD_PINMUX is not set
 # CONFIG_CMD_SOURCE is not set
 CONFIG_OF_CONTROL=y
Signature · 1 line
2.17.1
#18 lore raw

PATCH 8/15 arm: dts: ns3: add qspi node

In reply to Rayagonda Kokatanur

Add QSPI node and qspi NOR flash node for NS3.

---
 arch/arm/dts/ns3-board.dts | 16 ++++++++++++++++
 arch/arm/dts/ns3.dtsi      |  9 +++++++++
 2 files changed, 25 insertions(+)
arch/arm/dts/ns3-board.dts +16 -0
index 45565c9c73..78a69ac3f9 100644
@@ -35,6 +35,7 @@
 
 	aliases {
 		serial0 = &uart1;
+		spi0 = &qspi;
 		gpio0 = &gpio_hsls;
 	};
 
@@ -47,6 +48,21 @@
 	status = "okay";
 };
 
+&qspi {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+	spi_nor_flash: spi_flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <12500000>;
+		spi-cpol;
+		spi-cpha;
+		spi-tx-bus-width = <1>;
+		spi-rx-bus-width = <4>;
+	};
+};
+
 &sdio0 {
 	status = "okay";
 };
arch/arm/dts/ns3.dtsi +9 -0
index 7f94b922fc..7681bbc673 100644
@@ -33,6 +33,15 @@
 			status = "disabled";
 		};
 
+		qspi: spi at 370000 {
+			compatible = "brcm,iproc-qspi";
+			reg = <0x00370000 0x100>,
+			      <0x00370100 0x100>,
+			      <0x00370200 0x200>;
+			reg-names = "bspi", "bspi_raf", "mspi";
+			status = "disabled";
+		};
+
 		sdio0: sdhci at 3f1000 {
 			compatible = "brcm,iproc-sdhci";
 			reg = <0x003f1000 0x100>;
Signature · 1 line
2.17.1
#20 lore raw

PATCH 9/15 arm: dts: ns3: add i2c node

In reply to Rayagonda Kokatanur

Add IPROC I2C node for NS3.

---
 arch/arm/dts/ns3-board.dts | 1 +
 arch/arm/dts/ns3.dtsi      | 6 ++++++
 2 files changed, 7 insertions(+)
arch/arm/dts/ns3-board.dts +1 -0
index 78a69ac3f9..f8e501c225 100644
@@ -36,6 +36,7 @@
 	aliases {
 		serial0 = &uart1;
 		spi0 = &qspi;
+		i2c0 = &i2c0;
 		gpio0 = &gpio_hsls;
 	};
 
arch/arm/dts/ns3.dtsi +6 -0
index 7681bbc673..adb1277471 100644
@@ -60,6 +60,12 @@
 			status = "disabled";
 		};
 
+		i2c0:i2c at b0000 {
+			compatible = "brcm,iproc-i2c";
+			reg = <0xb0000 0x100>;
+			bus-frequency = <100000>;
+		};
+
 		gpio_hsls: gpio at d0000 {
 			compatible = "brcm,iproc-gpio";
 			reg = <0x000d0000 0x864>;
Signature · 1 line
2.17.1
#22 lore raw

PATCH 10/15 arm: dts: ns3: add PAXB PCIe host and phy node

In reply to Rayagonda Kokatanur

From: Srinath Mannam <[email protected]>

Add PAXB PCIe host controller and phy node for NS3.

---
 arch/arm/dts/ns3-board.dts |  36 +++++++++
 arch/arm/dts/ns3.dtsi      | 158 +++++++++++++++++++++++++++++++++++++
 2 files changed, 194 insertions(+)
arch/arm/dts/ns3-board.dts +36 -0
index f8e501c225..460ed39132 100644
@@ -67,3 +67,39 @@
 &sdio0 {
 	status = "okay";
 };
+
+&pcie0 {
+	status = "okay";
+};
+
+&pcie1 {
+	status = "okay";
+};
+
+&pcie2 {
+	status = "okay";
+};
+
+&pcie3 {
+	status = "okay";
+};
+
+&pcie4 {
+	status = "okay";
+};
+
+&pcie5 {
+	status = "okay";
+};
+
+&pcie6 {
+	status = "okay";
+};
+
+&pcie7 {
+	status = "okay";
+};
+
+&pcie8 {
+	status = "okay";
+};
arch/arm/dts/ns3.dtsi +158 -0

168 lines not on this page · raw message

Signature · 1 line
2.17.1
#23 lore raw

PATCH 10/15 arm: dts: ns3: add PAXB PCIe host and phy node

Quoted 11 lines · Rayagonda Kokatanur

From: Srinath Mannam <[email protected]>

Add PAXB PCIe host controller and phy node for NS3.

---
 arch/arm/dts/ns3-board.dts |  36 +++++++++
 arch/arm/dts/ns3.dtsi      | 158 +++++++++++++++++++++++++++++++++++++
 2 files changed, 194 insertions(+)
#24 lore raw

PATCH 11/15 configs: ns3: enable gpt commands

In reply to Rayagonda Kokatanur

Enable gpt commands for ns3.

---
 configs/bcm_ns3_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/bcm_ns3_defconfig +2 -0
index a1ee866e54..0f23f30db2 100644
@@ -14,6 +14,8 @@ CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="u-boot> "
 CONFIG_SYS_XTRACE="n"
+CONFIG_CMD_GPT=y
+CONFIG_CMD_GPT_RENAME=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_MMC_SWRITE=y
 # CONFIG_CMD_PINMUX is not set
Signature · 1 line
2.17.1
#26 lore raw

PATCH 12/15 configs: ns3: enable EXT4 and FAT fs support

In reply to Rayagonda Kokatanur

Enable EXT4 and FAT fs support for ns3.

---
 configs/bcm_ns3_defconfig | 5 +++++
 1 file changed, 5 insertions(+)
configs/bcm_ns3_defconfig +5 -0
index 0f23f30db2..66fbdb20d6 100644
@@ -20,6 +20,10 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_MMC_SWRITE=y
 # CONFIG_CMD_PINMUX is not set
 # CONFIG_CMD_SOURCE is not set
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+# CONFIG_DOS_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="ns3-board"
 CONFIG_DM=y
@@ -33,4 +37,5 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_SPL_OF_LIBFDT=y
Signature · 1 line
2.17.1
#27 lore raw

PATCH 12/15 configs: ns3: enable EXT4 and FAT fs support

Hi Rayagonda,

Quoted 7 lines · Rayagonda Kokatanur

Enable EXT4 and FAT fs support for ns3.

---
 configs/bcm_ns3_defconfig | 5 +++++
 1 file changed, 5 insertions(+)

I don't think it is worth bringing in multiple config changes in separate patches when you are adding a new board. You could have one at the end to enable all the new features.

- Simon

#28 lore raw

PATCH 13/15 configs: ns3: enable sp805 watchdog driver

In reply to Rayagonda Kokatanur

Enable sp805 watchdog driver for ns3.

---
 configs/bcm_ns3_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/bcm_ns3_defconfig +3 -0
index 66fbdb20d6..3cb69eff9d 100644
@@ -37,5 +37,8 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
+# CONFIG_WATCHDOG is not set
+CONFIG_WDT=y
+CONFIG_WDT_SP805=y
 CONFIG_FAT_WRITE=y
 CONFIG_SPL_OF_LIBFDT=y
Signature · 1 line
2.17.1
#30 lore raw

PATCH 14/15 arm: dts: ns3: add sp805 watchdog node

In reply to Rayagonda Kokatanur

From: Pramod Kumar <[email protected]>

Add sp805 watchdog dts node for ns3.

---
 arch/arm/dts/ns3.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/dts/ns3.dtsi +8 -0
index 9fd59a855e..6962e658d3 100644
@@ -29,6 +29,14 @@
 		ranges = <0x0 0x0 0x68900000 0x17700000>;
 
 		#include "ns3-pinctrl.dtsi"
+		#include "ns3-clock.dtsi"
+
+		wdt0: watchdog at c0000 {
+			compatible = "arm,sp805-wdt";
+			reg = <0x000c0000 0x1000>;
+			timeout-sec = <60>;
+			clocks = <&hsls_25m_div2_clk>;
+		};
 
 		uart1: uart at 110000 {
 			compatible = "snps,dw-apb-uart";
Signature · 1 line
2.17.1
#32 lore raw

PATCH 15/15 board: ns3: start sp805 watchdog service

In reply to Rayagonda Kokatanur

Start sp805 watchdog service.

Parse wdt timeout from env and dts, give precedence to env timeout if defined. Set default timeout to 60s if both env and dts doesn't specifiy timeout.

Stop the WDT in board late init and start the
WDT service before giving control to Linux.

---
 board/broadcom/bcmns3/ns3.c | 56 +++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
board/broadcom/bcmns3/ns3.c +56 -0
index 51cab1aad3..37a3cf9d14 100644
@@ -11,9 +11,12 @@
 #include <asm/gic.h>
 #include <asm/gic-v3.h>
 #include <asm/system.h>
+#include <dm/device.h>
+#include <dm/uclass.h>
 #include <dt-bindings/memory/bcm-ns3-mc.h>
 #include <fdtdec.h>
 #include <fdt_support.h>
+#include <wdt.h>
 
 #define BANK_OFFSET(bank)      ((u64)BCM_NS3_DDR_INFO_BASE + 8 + ((bank) * 16))
 
@@ -134,6 +137,14 @@ int board_init(void)
 
 int board_late_init(void)
 {
+#if CONFIG_IS_ENABLED(WDT)
+	/*
+	 * Default WDT service is started with 60 sec time out.
+	 * Disable it and start before giving control to Linux.
+	 */
+	wdt_stop(gd->watchdog_dev);
+#endif
+
 	return 0;
 }
 
@@ -185,12 +196,57 @@ void reset_cpu(ulong level)
 }
 
 #ifdef CONFIG_OF_BOARD_SETUP
+#if CONFIG_IS_ENABLED(WDT)
+
+#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
+#define CONFIG_WATCHDOG_TIMEOUT_MSECS	(60 * 1000)
+#endif
+#define DEF_TIMEOUT_SEC	(CONFIG_WATCHDOG_TIMEOUT_MSECS / 1000)
+
+static int start_wdt(void)
+{
+	u32 timeout = DEF_TIMEOUT_SEC;
+	struct udevice *udev;
+	int rc = 0;
+	u32 wdt_enable;
+
+	wdt_enable = env_get_ulong("wdt_enable", 16, 0);
+	printf("wdt_enable :%u\n", wdt_enable);
+	if (!wdt_enable)
+		return rc;
+
+	rc = uclass_get_device(UCLASS_WDT, 0, &udev);
+	if (rc) {
+		printf("Failed to get wdt rc:%d\n", rc);
+	} else {
+		timeout = env_get_ulong("wdt_timeout_sec", 10, 0);
+		if (!timeout) {
+			if (CONFIG_IS_ENABLED(OF_CONTROL))
+				timeout = dev_read_u32_default(gd->watchdog_dev,
+							       "timeout-sec",
+							       DEF_TIMEOUT_SEC);
+		}
+		wdt_start(udev, timeout * 1000, 0);
+		printf("Started wdt (%ds timeout)\n", timeout);
+	}
+
+	return rc;
+}
+#else
+static int start_wdt(void)
+{
+	return 0;
+}
+#endif /* CONFIG_WDT */
+
 int ft_board_setup(void *fdt, bd_t *bd)
 {
 	gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS);
 
 	mem_info_parse_fixup(fdt);
 
+	start_wdt();
+
 	return 0;
 }
 #endif /* CONFIG_OF_BOARD_SETUP */
Signature · 1 line
2.17.1
#33 lore raw

PATCH 15/15 board: ns3: start sp805 watchdog service

Hi Rayagonda,

Quoted 22 lines · Rayagonda Kokatanur

Start sp805 watchdog service.

Parse wdt timeout from env and dts, give precedence to env timeout if defined. Set default timeout to 60s if both env and dts doesn't specifiy timeout.

Stop the WDT in board late init and start the
WDT service before giving control to Linux.

---
 board/broadcom/bcmns3/ns3.c | 56 +++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
board/broadcom/bcmns3/ns3.c +0 -0
index 51cab1aad3..37a3cf9d14 100644

board/broadcom/bcmns3/ns3.c line 15

Quoted 5 lines
board/broadcom/bcmns3/ns3.c +2 -0
@@ -11,9 +11,12 @@
 #include <asm/gic.h>
 #include <asm/gic-v3.h>
 #include <asm/system.h>
+#include <dm/device.h>
+#include <dm/uclass.h>

You can include <dm.h> and get both of those

board/broadcom/bcmns3/ns3.c line 17

Quoted 2 lines
board/broadcom/bcmns3/ns3.c +0 -0
 #include <dt-bindings/memory/bcm-ns3-mc.h>
 #include <fdtdec.h>

Hoping you don't need that?

board/broadcom/bcmns3/ns3.c line 21

Quoted 4 lines
board/broadcom/bcmns3/ns3.c +1 -0
 #include <fdt_support.h>
+#include <wdt.h>
 
 #define BANK_OFFSET(bank)      ((u64)BCM_NS3_DDR_INFO_BASE + 8 + ((bank) * 16))

Maybe you should change the BCM_NS3... to ULL? Then you shouldn't need that cast.

board/broadcom/bcmns3/ns3.c int board_init(void) · line 140

Quoted 6 lines
board/broadcom/bcmns3/ns3.c +1 -0
@@ -134,6 +137,14 @@ int board_init(void)
 
 int board_late_init(void)
 {
+#if CONFIG_IS_ENABLED(WDT)

Is it possible to use if() instead of #if?

Quoted 26 lines
board/broadcom/bcmns3/ns3.c +19 -0
+       /*
+        * Default WDT service is started with 60 sec time out.
+        * Disable it and start before giving control to Linux.
+        */
+       wdt_stop(gd->watchdog_dev);
+#endif
+
        return 0;
 }
 
@@ -185,12 +196,57 @@ void reset_cpu(ulong level)
 }
 
 #ifdef CONFIG_OF_BOARD_SETUP
+#if CONFIG_IS_ENABLED(WDT)
+
+#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
+#define CONFIG_WATCHDOG_TIMEOUT_MSECS  (60 * 1000)
+#endif
+#define DEF_TIMEOUT_SEC        (CONFIG_WATCHDOG_TIMEOUT_MSECS / 1000)
+
+static int start_wdt(void)
+{
+       u32 timeout = DEF_TIMEOUT_SEC;
+       struct udevice *udev;
+       int rc = 0;

board/broadcom/bcmns3/ns3.c void reset_cpu(ulong level) · line 220

Quoted 10 lines
board/broadcom/bcmns3/ns3.c +10 -0
+       u32 wdt_enable;
+
+       wdt_enable = env_get_ulong("wdt_enable", 16, 0);
+       printf("wdt_enable :%u\n", wdt_enable);
+       if (!wdt_enable)
+               return rc;
+
+       rc = uclass_get_device(UCLASS_WDT, 0, &udev);
+       if (rc) {
+               printf("Failed to get wdt rc:%d\n", rc);

I suggest return rc here, so you don't need the 'else' below, and the extra indent/

Quoted 5 lines
board/broadcom/bcmns3/ns3.c +5 -0
+       } else {
+               timeout = env_get_ulong("wdt_timeout_sec", 10, 0);
+               if (!timeout) {
+                       if (CONFIG_IS_ENABLED(OF_CONTROL))
+                               timeout = dev_read_u32_default(gd->watchdog_dev,

board/broadcom/bcmns3/ns3.c void reset_cpu(ulong level) · line 235

Quoted 10 lines
board/broadcom/bcmns3/ns3.c +10 -0
+                                                              "timeout-sec",
+                                                              DEF_TIMEOUT_SEC);
+               }
+               wdt_start(udev, timeout * 1000, 0);
+               printf("Started wdt (%ds timeout)\n", timeout);
+       }
+
+       return rc;
+}
+#else

Not sure why you need this:

board/broadcom/bcmns3/ns3.c void reset_cpu(ulong level) · line 248

Quoted 13 lines
board/broadcom/bcmns3/ns3.c +7 -0
+static int start_wdt(void)
+{
+       return 0;
+}
+#endif /* CONFIG_WDT */
+
 int ft_board_setup(void *fdt, bd_t *bd)
 {
        gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS);
 
        mem_info_parse_fixup(fdt);
 
+       start_wdt();

Perhaps you could drop the #idefs above and do something like this here:

if (CONFIG_IS_ENABLED(WDT))
start_wdt();

Quoted 7 lines
board/broadcom/bcmns3/ns3.c +1 -1
+
        return 0;
 }
 #endif /* CONFIG_OF_BOARD_SETUP */
--

2.17.1

Regards,
Simon

#34 lore raw

cover add basic driver support for broadcom NS3 soc

In reply to Rayagonda Kokatanur

Review

Quoted 9 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200518/2ebe4ada/attachment.sig>
#35 lore raw

cover add basic driver support for broadcom NS3 soc

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Best regards,
Rayagonda

Quoted 3 lines

--
Tom

#36 lore raw

cover add basic driver support for broadcom NS3 soc

Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/089a6e4e/attachment.sig>
#37 lore raw

cover add basic driver support for broadcom NS3 soc

Quoted 23 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 16 lines · Tom Rini

Review

Quoted 9 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 5 lines
Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

It's Linux v5.6.

Best regards,
Rayagonda

Quoted 4 lines

--
Tom

#38 lore raw

cover add basic driver support for broadcom NS3 soc

Quoted 24 lines · Rayagonda Kokatanur
Quoted 23 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 16 lines · Tom Rini

Review

Quoted 9 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Thomas

#39 lore raw

cover add basic driver support for broadcom NS3 soc

Hi Thomas,

Quoted 30 lines · Thomas Fitzsimmons
Quoted 27 lines · Rayagonda Kokatanur
Quoted 26 lines · Tom Rini
Quoted 23 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ? Please let me know.

Best regards,
Rayagonda

Quoted 2 lines

Thomas

#40 lore raw

cover add basic driver support for broadcom NS3 soc

Hi Rayagonda,

Quoted 37 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 33 lines · Thomas Fitzsimmons
Quoted 30 lines · Rayagonda Kokatanur
Quoted 28 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

Regards,
SImon

#41 lore raw

cover add basic driver support for broadcom NS3 soc

Hi Simon,

Quoted 51 lines · Simon Glass

Hi Rayagonda,

Quoted 37 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 33 lines · Thomas Fitzsimmons
Quoted 30 lines · Rayagonda Kokatanur
Quoted 28 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

Quoted 7 lines

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Best regards,
Rayagonda

Quoted 3 lines

Regards,
SImon

#42 lore raw

cover add basic driver support for broadcom NS3 soc

Hi Rayagonda,

Quoted 76 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 51 lines · Simon Glass

Hi Rayagonda,

Quoted 37 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 33 lines · Thomas Fitzsimmons
Quoted 30 lines · Rayagonda Kokatanur
Quoted 28 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

Quoted 7 lines

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

Regards,
Simon

#43 lore raw

cover add basic driver support for broadcom NS3 soc

Quoted 92 lines · Simon Glass

Hi Rayagonda,

Quoted 76 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 51 lines · Simon Glass

Hi Rayagonda,

Quoted 37 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 33 lines · Thomas Fitzsimmons
Quoted 30 lines · Rayagonda Kokatanur
Quoted 28 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

Quoted 7 lines

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

Quoted 7 lines

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

We have that for a little while now, OF_DTB_PROPS_REMOVE, from trying to trim things down for tbs2910.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200603/89a4aaad/attachment.sig>
#44 lore raw

cover add basic driver support for broadcom NS3 soc

Quoted 98 lines · Tom Rini
Quoted 97 lines · Simon Glass

Hi Rayagonda,

Quoted 76 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 51 lines · Simon Glass

Hi Rayagonda,

Quoted 37 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 33 lines · Thomas Fitzsimmons
Quoted 30 lines · Rayagonda Kokatanur
Quoted 28 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

Quoted 7 lines

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

Quoted 6 lines
Quoted 2 lines

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

We have that for a little while now, OF_DTB_PROPS_REMOVE, from trying to trim things down for tbs2910.

For tbs2910 we remove some properties, not whole nodes, from the dtb. Is it possible to also remove complete nodes? This would help even more for size reduction, I think.

Soeren

#45 lore raw

cover add basic driver support for broadcom NS3 soc

Quoted 102 lines · Soeren Moch
Quoted 101 lines · Tom Rini
Quoted 99 lines · Simon Glass

Hi Rayagonda,

Quoted 76 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 51 lines · Simon Glass

Hi Rayagonda,

Quoted 37 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 33 lines · Thomas Fitzsimmons
Quoted 30 lines · Rayagonda Kokatanur
Quoted 28 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

Quoted 7 lines

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

Quoted 6 lines
Quoted 3 lines

We have that for a little while now, OF_DTB_PROPS_REMOVE, from trying to trim things down for tbs2910.

For tbs2910 we remove some properties, not whole nodes, from the dtb. Is it possible to also remove complete nodes? This would help even more for size reduction, I think.

Ah, that I think not. Another idea to keep in mind for the dtoc enhancements perhaps? There is very much a use case of having a dtb (or set of dtbs) and a U-Boot (full or SPL) and not needing/wanting to pass our DTB on to the OS so both discarding things from the DTB and from U-Boot based on this knowledge would be great.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200605/a3f0ac48/attachment.sig>
#46 lore raw

cover add basic driver support for broadcom NS3 soc

Hi Tom,

Quoted 89 lines · Tom Rini
Quoted 88 lines · Soeren Moch
Quoted 87 lines · Tom Rini
Quoted 76 lines · Simon Glass

Hi Rayagonda,

Quoted 61 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 37 lines · Simon Glass

Hi Rayagonda,

Quoted 33 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 30 lines · Thomas Fitzsimmons
Quoted 20 lines · Rayagonda Kokatanur
Quoted 19 lines · Tom Rini
Quoted 18 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 14 lines · Tom Rini
Quoted 9 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the
first patch set ("add initial support for broadcom NS3 soc").

This patch set will add following,
-dt nodes and defconfig options for basic device like pinctrl,
gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Quoted 8 lines
Quoted 2 lines

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

Quoted 7 lines

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

We have that for a little while now, OF_DTB_PROPS_REMOVE, from trying to trim things down for tbs2910.

Quoted 9 lines
Quoted 3 lines

For tbs2910 we remove some properties, not whole nodes, from the dtb. Is it possible to also remove complete nodes? This would help even more for size reduction, I think.

Ah, that I think not. Another idea to keep in mind for the dtoc enhancements perhaps? There is very much a use case of having a dtb (or set of dtbs) and a U-Boot (full or SPL) and not needing/wanting to pass our DTB on to the OS so both discarding things from the DTB and from U-Boot based on this knowledge would be great.

This enhancement sounds more to extend the current u-boot.dtsi feature, to include just specific nodes in the dtb, which currently works for SPL. A first step towards this direction could be to add a configuration option to use the same DTB for? both SPL and U-Boot, which would be a reduced version if the proper u-boot.dtsi is found.

What do you think?

Regarding dtoc, currently is used to parse dtb and to convert this info to C structures, which doesn't seems to be the desired goal here.

Regards,

Walter

#47 lore raw

cover add basic driver support for broadcom NS3 soc

Quoted 101 lines · Walter Lozano

Hi Tom,

Quoted 89 lines · Tom Rini
Quoted 88 lines · Soeren Moch
Quoted 87 lines · Tom Rini
Quoted 76 lines · Simon Glass

Hi Rayagonda,

Quoted 61 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 37 lines · Simon Glass

Hi Rayagonda,

Quoted 33 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 30 lines · Thomas Fitzsimmons
Quoted 20 lines · Rayagonda Kokatanur
Quoted 19 lines · Tom Rini
Quoted 18 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 14 lines · Tom Rini

On Sun, May 17, 2020 at 01:49:30PM +0530, Rayagonda Kokatanur wrote:

This is the second patch set series prepared on top of the
first patch set ("add initial support for broadcom NS3 soc").

This patch set will add following,
-dt nodes and defconfig options for basic device like pinctrl,
gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support
All of the dts changes not in a -u-boot.dtsi file either come from
mainline Linux or at least linux-next and have had some level upstream
review, right? Thanks!

Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Quoted 8 lines
Quoted 2 lines

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

Quoted 7 lines

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

We have that for a little while now, OF_DTB_PROPS_REMOVE, from trying to trim things down for tbs2910.

Quoted 9 lines
Quoted 3 lines

For tbs2910 we remove some properties, not whole nodes, from the dtb. Is it possible to also remove complete nodes? This would help even more for size reduction, I think.

Ah, that I think not. Another idea to keep in mind for the dtoc enhancements perhaps? There is very much a use case of having a dtb (or set of dtbs) and a U-Boot (full or SPL) and not needing/wanting to pass our DTB on to the OS so both discarding things from the DTB and from U-Boot based on this knowledge would be great.

Quoted 7 lines

This enhancement sounds more to extend the current u-boot.dtsi feature, to include just specific nodes in the dtb, which currently works for SPL. A first step towards this direction could be to add a configuration option to use the same DTB for? both SPL and U-Boot, which would be a reduced version if the proper u-boot.dtsi is found.

What do you think?

I think there's another RFC patch that dropped a ton of not-needed nodes via the -u-boot.dtsi file but that's also less than ideal since it's manual.

Quoted 2 lines

Regarding dtoc, currently is used to parse dtb and to convert this info to C structures, which doesn't seems to be the desired goal here.

So, what made me think of dtoc is that we aren't so much tied to device trees because we want device trees, but rather we're tied to device trees because that's the common format for describing hardware in a machine readable format.

While this is more appropriate to the RFC thread about tiny-DM or some other idea, what keeps popping to my mind is that we have few cases where the device tree we work from is being passed to us from some outside source. Most of the time we're being told at build time the device tree, or sometimes trees, that will ever be used on a platform at run time. How can we use that information to discard never-will-be-used information? If we've turned the device trees to C, then we can <do something I haven't figured out the details on> and have the linker discard things.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200605/d3dd0c6d/attachment.sig>
#48 lore raw

cover add basic driver support for broadcom NS3 soc

Hi Tom.

Quoted 108 lines · Tom Rini
Quoted 107 lines · Walter Lozano

Hi Tom,

Quoted 89 lines · Tom Rini
Quoted 88 lines · Soeren Moch
Quoted 87 lines · Tom Rini
Quoted 76 lines · Simon Glass

Hi Rayagonda,

Quoted 61 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 37 lines · Simon Glass

Hi Rayagonda,

Quoted 33 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 30 lines · Thomas Fitzsimmons
Quoted 20 lines · Rayagonda Kokatanur
Quoted 19 lines · Tom Rini
Quoted 18 lines · Rayagonda Kokatanur

Hi Tom,

On Tue, May 19, 2020 at 12:46 AM Tom Rini <[email protected]> wrote:
On Sun, May 17, 2020 at 01:49:30PM +0530, Rayagonda Kokatanur wrote:

This is the second patch set series prepared on top of the
first patch set ("add initial support for broadcom NS3 soc").

This patch set will add following,
-dt nodes and defconfig options for basic device like pinctrl,
gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support
All of the dts changes not in a -u-boot.dtsi file either come from
mainline Linux or at least linux-next and have had some level upstream
review, right? Thanks!

Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at
arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Quoted 8 lines
Quoted 2 lines

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

Quoted 7 lines

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

We have that for a little while now, OF_DTB_PROPS_REMOVE, from trying to trim things down for tbs2910.

Quoted 9 lines
Quoted 3 lines

For tbs2910 we remove some properties, not whole nodes, from the dtb. Is it possible to also remove complete nodes? This would help even more for size reduction, I think.

Ah, that I think not. Another idea to keep in mind for the dtoc enhancements perhaps? There is very much a use case of having a dtb (or set of dtbs) and a U-Boot (full or SPL) and not needing/wanting to pass our DTB on to the OS so both discarding things from the DTB and from U-Boot based on this knowledge would be great.

This enhancement sounds more to extend the current u-boot.dtsi feature, to include just specific nodes in the dtb, which currently works for SPL. A first step towards this direction could be to add a configuration option to use the same DTB for? both SPL and U-Boot, which would be a reduced version if the proper u-boot.dtsi is found.

Quoted 4 lines
Quoted 1 line

What do you think?

I think there's another RFC patch that dropped a ton of not-needed nodes via the -u-boot.dtsi file but that's also less than ideal since it's manual.

I see, thanks for clarifying.

Quoted 7 lines
Quoted 2 lines

Regarding dtoc, currently is used to parse dtb and to convert this info to C structures, which doesn't seems to be the desired goal here.

So, what made me think of dtoc is that we aren't so much tied to device trees because we want device trees, but rather we're tied to device trees because that's the common format for describing hardware in a machine readable format.

Quoted 9 lines

While this is more appropriate to the RFC thread about tiny-DM or some other idea, what keeps popping to my mind is that we have few cases where the device tree we work from is being passed to us from some outside source. Most of the time we're being told at build time the device tree, or sometimes trees, that will ever be used on a platform at run time. How can we use that information to discard never-will-be-used information? If we've turned the device trees to C, then we can <do something I haven't figured out the details on> and have the linker discard things.

I totally agree with you. From what I see there are several things we could do. Let's continue the discussion on the RFC thread about tiny-DM

Regards,

Walter

#49 lore raw

cover add basic driver support for broadcom NS3 soc

In reply to Simon Glass

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Rayagonda,

Quoted 76 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 51 lines · Simon Glass

Hi Rayagonda,

Quoted 37 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 33 lines · Thomas Fitzsimmons
Quoted 30 lines · Rayagonda Kokatanur
Quoted 28 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

Quoted 7 lines

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

Quoted 7 lines

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

Thank you for your suggestion.

Right now linux dt files are not upstremed.
Upstreaming linux dt files first and then using the same in uboot will delay these uboot patch merge.
Hence I am planning to do following,
1. Use one sample dt file with just few basic nodes so that uboot can be built without any issues.
2. Parallely start linux dt file upstream.
3. Once the linux dt file gets merged, I will pull them into uboot and submit a patch.

Please let me know.

Best regards,
Rayagonda

Quoted 3 lines

Regards,
Simon

#50 lore raw

cover add basic driver support for broadcom NS3 soc

Hi Rayagonda,

Quoted 102 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 98 lines · Simon Glass

Hi Rayagonda,

Quoted 76 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 51 lines · Simon Glass

Hi Rayagonda,

Quoted 37 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 33 lines · Thomas Fitzsimmons
Quoted 30 lines · Rayagonda Kokatanur
Quoted 28 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

Quoted 7 lines

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

Quoted 7 lines
Quoted 2 lines

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

Thank you for your suggestion.

Right now linux dt files are not upstremed.
Upstreaming linux dt files first and then using the same in uboot will

U-Boot

Quoted 9 lines

delay these uboot patch merge.
Hence I am planning to do following,
1. Use one sample dt file with just few basic nodes so that uboot can be built without any issues.
2. Parallely start linux dt file upstream.
3. Once the linux dt file gets merged, I will pull them into uboot and submit a patch.

Please let me know.

That sounds fine to me.

Regards,
Simon

#51 lore raw

cover add basic driver support for broadcom NS3 soc

Quoted 125 lines · Simon Glass

Hi Rayagonda,

Quoted 102 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 98 lines · Simon Glass

Hi Rayagonda,

Quoted 76 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 51 lines · Simon Glass

Hi Rayagonda,

Quoted 37 lines · Rayagonda Kokatanur

Hi Thomas,

Quoted 33 lines · Thomas Fitzsimmons
Quoted 30 lines · Rayagonda Kokatanur
Quoted 28 lines · Tom Rini
Quoted 21 lines · Rayagonda Kokatanur

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 3 lines · Rayagonda Kokatanur

This is the second patch set series prepared on top of the first patch set ("add initial support for broadcom NS3 soc").

Quoted 10 lines

Review

Quoted 6 lines

This patch set will add following,

(quoted diff) +0 -4
-dt nodes and defconfig options for basic device like pinctrl,
 gpio, mmc, qspi, wdt, i2c and pcie.
-start wdt service
-Enable GPT commands
-Enable EXT4 and FAT fs support

All of the dts changes not in a -u-boot.dtsi file either come from mainline Linux or at least linux-next and have had some level upstream review, right? Thanks!

Quoted 2 lines

Yes. All the DTS changes are merged in the Linux and are available at arch/arm64/boot/dts/broadcom/stingray/

Great. Please reference the release you're taking these from as that will make future resyncs easier. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's Linux v5.6.

What's the relationship between e.g., bcm958742t.dts and ns3.dts? I looked at the mainline Linux device trees and I couldn't easily see the correspondence. Will the renaming complicate synchronization?

Do we need to maintain the same dt file between linux and uboot ? Also in uboot we don't enable all devices, how do we handle this ?

Quoted 7 lines

If there is no U-Boot driver for a particular node then it will be ignored. It is easier to keep them in sync if they are the same in U-Boot and Linux.

Quoted 1 line

Please let me know.

That is implied by your question above :-)

NS3 board is derivative of the existing bcm95874t board (arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dt)
Hence we have different dt for NS3 in Linux but it is not yet upstremed.

I compared the dt file size between uboot and Linux. Uboot dt size = 9K
Linux dt size = 41K (32K extra)

In uboot we have 8MB non-volatile SPI flash memory.
Out of 8MB, 1.5MB is allocated to fip.bin image and remaining 6.5MB space is allocated to other components
like nitor/bnxt firmware image, DDR shmoo value and for backup image.

Quoted 8 lines

uboot.bin is part of the fip.bin image. If we pull Linux dt files this will use extra 33K memory of allocated 1.5MB.
This increase in 33K will reduce total memory availability for u-boot and other features (like ARM trusted firmware, Op-TEE OS) development in future.
Hence we anticipate qpsi memory shortage going ahead for new features.

So please let me know your view on maintaining different dt files in uboot.

Sounds like you have plenty of memory, actually. Is U-Boot the first thing to load?

I think it is important to use the same filename and have the same DT contents where they are present in U-Boot. But if you want to leave out nodes, etc., that seems OK to me. It should be easy enough to meld in the updates later.

Quoted 7 lines
Quoted 2 lines

I wonder if we should add a way to drop unused nodes for U-Boot proper, like we do for SPL?

Thank you for your suggestion.

Right now linux dt files are not upstremed.
Upstreaming linux dt files first and then using the same in uboot will

U-Boot

Quoted 8 lines

delay these uboot patch merge.
Hence I am planning to do following,
1. Use one sample dt file with just few basic nodes so that uboot can be built without any issues.
2. Parallely start linux dt file upstream.
3. Once the linux dt file gets merged, I will pull them into uboot and submit a patch.

Quoted 3 lines
Quoted 1 line

Please let me know.

That sounds fine to me.

Thank you Simon.

Quoted 3 lines

Regards,
Simon