Skip to contentSkip to conversation

add basic driver support for broadcom NS3 soc

PATCH Superseded Rayagonda Kokatanur 2 participants 15 messages Jul 15, 2020 – Jul 29, 2020

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

v5 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,
-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

Changes from v4:
-Rebase on top of first patch set.

Changes from v3:
-Rebase on top of first patch set.

Changes from v2:
-Address review comments from Stefan Rose,
Remove patch to stop and start wdt service from board files. Instead define CONFIG_WATCHDOG defconfig which takes care of wdt reset for every 1s.

Changes from v1:
-Address review comments from Simon,
-include <dm.h> instead of <dm/device.h> and <dm/uclass.h> -remove include <fdtdec.h> as its not required -Use if() instead of #if def
-rearrange code in start_wdt()
-remove #else part of #ifdef CONFIG_DT

-Address review comments from Tom and Simon,
Remove all dt patches as uboot should use the same dt file from Linux.

Rayagonda Kokatanur (7):
configs: ns3: enable pinctrl driver
dt-bindings: pinctrl: add ns3 pads definition
configs: ns3: enable BCM IPROC mmc driver
configs: ns3: enable mmc commands
configs: ns3: enable gpt commands
configs: ns3: enable EXT4 and FAT fs support
configs: ns3: enable sp805 watchdog driver

 configs/bcm_ns3_defconfig                     | 18 ++++++++
 .../dt-bindings/pinctrl/brcm,pinctrl-ns3.h    | 41 +++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 include/dt-bindings/pinctrl/brcm,pinctrl-ns3.h
Signature · 1 line
2.17.1
#1 lore raw

PATCH v5 1/7 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
#2 lore raw

PATCH v5 1/7 configs: ns3: enable pinctrl driver

Quoted 4 lines · Rayagonda Kokatanur

Enable pinctrl driver for ns3.

Applied to u-boot/master, 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/20200729/894706d7/attachment.sig>
#3 lore raw

PATCH v5 2/7 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
#4 lore raw

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

Quoted 4 lines · Rayagonda Kokatanur

Add NS3 pads definitions.

Applied to u-boot/master, 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/20200729/39403aa3/attachment.sig>
#5 lore raw

PATCH v5 3/7 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
#6 lore raw

PATCH v5 3/7 configs: ns3: enable BCM IPROC mmc driver

Quoted 5 lines · Rayagonda Kokatanur

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

Applied to u-boot/master, 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/20200729/f5bb476d/attachment.sig>
#7 lore raw

PATCH v5 4/7 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
#8 lore raw

PATCH v5 4/7 configs: ns3: enable mmc commands

Quoted 4 lines · Rayagonda Kokatanur

Enable mmc commands for NS3.

Applied to u-boot/master, 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/20200729/a9f43a52/attachment.sig>
#9 lore raw

PATCH v5 5/7 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
#10 lore raw

PATCH v5 5/7 configs: ns3: enable gpt commands

Quoted 4 lines · Rayagonda Kokatanur

Enable gpt commands for ns3.

Applied to u-boot/master, 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/20200729/1e40c9c6/attachment.sig>
#11 lore raw

PATCH v5 6/7 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
#12 lore raw

PATCH v5 6/7 configs: ns3: enable EXT4 and FAT fs support

Quoted 4 lines · Rayagonda Kokatanur

Enable EXT4 and FAT fs support for ns3.

Applied to u-boot/master, 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/20200729/9f61f21c/attachment.sig>
#13 lore raw

PATCH v5 7/7 configs: ns3: enable sp805 watchdog driver

In reply to Rayagonda Kokatanur

Enable sp805 watchdog driver for ns3.

---
 configs/bcm_ns3_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/bcm_ns3_defconfig +2 -0
index 66fbdb20d6..ab26617158 100644
@@ -37,5 +37,7 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
+CONFIG_WDT=y
+CONFIG_WDT_SP805=y
 CONFIG_FAT_WRITE=y
 CONFIG_SPL_OF_LIBFDT=y
Signature · 1 line
2.17.1
#14 lore raw

PATCH v5 7/7 configs: ns3: enable sp805 watchdog driver

Quoted 4 lines · Rayagonda Kokatanur

Enable sp805 watchdog driver for ns3.

Applied to u-boot/master, 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/20200729/b7044959/attachment.sig>