forked from u-boot/u-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MSCC: Add support for Servalt SoC family.
As Ocelot, Luton and Jaguar2, this family of SoCs are found in Microsemi Switches solution. Reviewed-by: Daniel Schwierzeck <[email protected]> Signed-off-by: Horatiu Vultur <[email protected]>
- Loading branch information
1 parent
177c07f
commit 0551251
Showing
10 changed files
with
419 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | ||
/* | ||
* Microsemi Servalt Switch driver | ||
* | ||
* Copyright (c) 2018 Microsemi Corporation | ||
*/ | ||
|
||
#ifndef _MSCC_SERVALT_H_ | ||
#define _MSCC_SERVALT_H_ | ||
|
||
#include <linux/bitops.h> | ||
#include <dm.h> | ||
|
||
/* | ||
* Target offset base(s) | ||
*/ | ||
#define MSCC_IO_ORIGIN1_OFFSET 0x70000000 | ||
#define MSCC_IO_ORIGIN1_SIZE 0x00200000 | ||
#define MSCC_IO_ORIGIN2_OFFSET 0x71000000 | ||
#define MSCC_IO_ORIGIN2_SIZE 0x01000000 | ||
#define BASE_CFG ((void __iomem *)0x70000000) | ||
#define BASE_DEVCPU_GCB ((void __iomem *)0x71010000) | ||
|
||
#endif |
20 changes: 20 additions & 0 deletions
20
arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | ||
/* | ||
* Copyright (c) 2018 Microsemi Corporation | ||
*/ | ||
|
||
#ifndef _MSCC_SERVALT_DEVCPU_GCB_H_ | ||
#define _MSCC_SERVALT_DEVCPU_GCB_H_ | ||
|
||
#define PERF_GPR 0x4 | ||
|
||
#define PERF_SOFT_RST 0x8 | ||
|
||
#define PERF_SOFT_RST_SOFT_NON_CFG_RST BIT(2) | ||
#define PERF_SOFT_RST_SOFT_SWC_RST BIT(1) | ||
#define PERF_SOFT_RST_SOFT_CHIP_RST BIT(0) | ||
|
||
#define GPIO_GPIO_ALT(x) (0x74 + 4 * (x)) | ||
#define GPIO_GPIO_ALT1(x) (0x7c + 4 * (x)) | ||
|
||
#endif |
25 changes: 25 additions & 0 deletions
25
arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | ||
/* | ||
* Copyright (c) 2018 Microsemi Corporation | ||
*/ | ||
|
||
#ifndef _MSCC_SERVALT_DEVCPU_GCB_MIIM_REGS_H_ | ||
#define _MSCC_SERVALT_DEVCPU_GCB_MIIM_REGS_H_ | ||
|
||
#define MIIM_MII_STATUS(gi) (0xc4 + (gi * 36)) | ||
#define MIIM_MII_CMD(gi) (0xcc + (gi * 36)) | ||
#define MIIM_MII_DATA(gi) (0xd0 + (gi * 36)) | ||
|
||
#define MSCC_F_MII_STATUS_MIIM_STAT_BUSY(x) ((x) ? BIT(3) : 0) | ||
|
||
#define MSCC_F_MII_CMD_MIIM_CMD_VLD(x) ((x) ? BIT(31) : 0) | ||
#define MSCC_F_MII_CMD_MIIM_CMD_PHYAD(x) (GENMASK(29, 25) & ((x) << 25)) | ||
#define MSCC_F_MII_CMD_MIIM_CMD_REGAD(x) (GENMASK(24, 20) & ((x) << 20)) | ||
#define MSCC_F_MII_CMD_MIIM_CMD_WRDATA(x) (GENMASK(19, 4) & ((x) << 4)) | ||
#define MSCC_F_MII_CMD_MIIM_CMD_OPR_FIELD(x) (GENMASK(2, 1) & ((x) << 1)) | ||
#define MSCC_F_MII_CMD_MIIM_CMD_SCAN(x) ((x) ? BIT(0) : 0) | ||
|
||
#define MSCC_M_MII_DATA_MIIM_DATA_SUCCESS GENMASK(17, 16) | ||
#define MSCC_X_MII_DATA_MIIM_DATA_RDDATA(x) (((x) >> 0) & GENMASK(15, 0)) | ||
|
||
#endif |
Oops, something went wrong.