Skip to contentSkip to conversation

mips: jz47xx: Add JZ4780 SoC support

PATCH New Marek Vasut 1 participant 2 messages May 26, 2016

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

PATCH 1/2 mips: jz47xx: Add JZ4780 SoC support

From: Paul Burton <[email protected]>

Add initial support for the Ingenic JZ47xx MIPS SoC. The DTSI file comes from Linux 4.6 as of revision 78800558d104e003f9ae92e0107f1de39cf9de9f

Cc Daniel Schwierzeck <[email protected]>
Cc Paul Burton <[email protected]>
---
 arch/mips/Kconfig                                |   7 +
 arch/mips/Makefile                               |   1 +
 arch/mips/dts/jz4780.dtsi                        | 137 ++++++
 arch/mips/mach-jz47xx/Kconfig                    |  15 +
 arch/mips/mach-jz47xx/Makefile                   |   7 +
 arch/mips/mach-jz47xx/include/mach/jz4780.h      |  99 +++++
 arch/mips/mach-jz47xx/include/mach/jz4780_dram.h | 457 ++++++++++++++++++++
 arch/mips/mach-jz47xx/jz4780/Makefile            |   5 +
 arch/mips/mach-jz47xx/jz4780/jz4780.c            | 126 ++++++
 arch/mips/mach-jz47xx/jz4780/pll.c               | 527 +++++++++++++++++++++++
 arch/mips/mach-jz47xx/jz4780/sdram.c             | 271 ++++++++++++
 arch/mips/mach-jz47xx/jz4780/timer.c             | 238 ++++++++++
 arch/mips/mach-jz47xx/jz4780/u-boot-spl.lds      |  52 +++
 arch/mips/mach-jz47xx/start.S                    |  99 +++++
 include/dt-bindings/clock/jz4780-cgu.h           |  88 ++++
 15 files changed, 2129 insertions(+)
 create mode 100644 arch/mips/dts/jz4780.dtsi
 create mode 100644 arch/mips/mach-jz47xx/Kconfig
 create mode 100644 arch/mips/mach-jz47xx/Makefile
 create mode 100644 arch/mips/mach-jz47xx/include/mach/jz4780.h
 create mode 100644 arch/mips/mach-jz47xx/include/mach/jz4780_dram.h
 create mode 100644 arch/mips/mach-jz47xx/jz4780/Makefile
 create mode 100644 arch/mips/mach-jz47xx/jz4780/jz4780.c
 create mode 100644 arch/mips/mach-jz47xx/jz4780/pll.c
 create mode 100644 arch/mips/mach-jz47xx/jz4780/sdram.c
 create mode 100644 arch/mips/mach-jz47xx/jz4780/timer.c
 create mode 100644 arch/mips/mach-jz47xx/jz4780/u-boot-spl.lds
 create mode 100644 arch/mips/mach-jz47xx/start.S
 create mode 100644 include/dt-bindings/clock/jz4780-cgu.h
arch/mips/Kconfig +7 -0
index 53363e3..ab9719c 100644
@@ -65,6 +65,12 @@ config ARCH_ATH79
 	select OF_CONTROL
 	select DM
 
+config ARCH_JZ47XX
+	bool "Support Ingenic JZ47xx"
+	select SUPPORT_SPL
+	select OF_CONTROL
+	select DM
+
 config MACH_PIC32
 	bool "Support Microchip PIC32"
 	select OF_CONTROL
@@ -78,6 +84,7 @@ source "board/micronas/vct/Kconfig"
 source "board/pb1x00/Kconfig"
 source "board/qemu-mips/Kconfig"
 source "arch/mips/mach-ath79/Kconfig"
+source "arch/mips/mach-jz47xx/Kconfig"
 source "arch/mips/mach-pic32/Kconfig"
 
 if MIPS
arch/mips/Makefile +1 -0
index 0b5dbb6..d28241e 100644
@@ -15,6 +15,7 @@ libs-y += arch/mips/lib/
 
 machine-$(CONFIG_SOC_AU1X00) += au1x00
 machine-$(CONFIG_ARCH_ATH79) += ath79
+machine-$(CONFIG_ARCH_JZ47XX) += jz47xx
 machine-$(CONFIG_MACH_PIC32) += pic32
 
 machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
arch/mips/dts/jz4780.dtsi new file +137 -0

137 lines not on this page · raw message

arch/mips/mach-jz47xx/Kconfig new file +15 -0
new file mode 100644
index 0000000..cd6944c
@@ -0,0 +1,15 @@
+menu "Ingenic JZ47xx platforms"
+	depends on ARCH_JZ47XX
+
+config SYS_SOC
+	default "jz47xx"
+
+config SOC_JZ4780
+	bool
+	select SUPPORTS_LITTLE_ENDIAN
+	select SUPPORTS_CPU_MIPS32_R1
+	select SUPPORTS_CPU_MIPS32_R2
+	help
+	  Support for Ingenic JZ4780 family SoCs.
+
+endmenu
arch/mips/mach-jz47xx/Makefile new file +7 -0
new file mode 100644
index 0000000..5eee9ac
@@ -0,0 +1,7 @@
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+extra-$(CONFIG_SPL_BUILD)	:= start.o
+
+obj-$(CONFIG_SOC_JZ4780)	+= jz4780/
arch/mips/mach-jz47xx/include/mach/jz4780.h new file +99 -0

99 lines not on this page · raw message

arch/mips/mach-jz47xx/include/mach/jz4780_dram.h new file +457 -0

457 lines not on this page · raw message

arch/mips/mach-jz47xx/jz4780/Makefile new file +5 -0
new file mode 100644
index 0000000..683eea6
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y := jz4780.o pll.o sdram.o timer.o
arch/mips/mach-jz47xx/jz4780/jz4780.c new file +126 -0

126 lines not on this page · raw message

arch/mips/mach-jz47xx/jz4780/pll.c new file +527 -0

527 lines not on this page · raw message

arch/mips/mach-jz47xx/jz4780/sdram.c new file +271 -0

271 lines not on this page · raw message

arch/mips/mach-jz47xx/jz4780/timer.c new file +238 -0

238 lines not on this page · raw message

arch/mips/mach-jz47xx/jz4780/u-boot-spl.lds new file +52 -0

52 lines not on this page · raw message

arch/mips/mach-jz47xx/start.S new file +99 -0

99 lines not on this page · raw message

include/dt-bindings/clock/jz4780-cgu.h new file +88 -0

88 lines not on this page · raw message

Signature · 1 line
2.7.0
#1 lore raw

PATCH 2/2 mips: jz47xx: Add minimal JZ MMC node

Add minimal JZ MMC node into the JZ4780 device tree. This piece is picked from the CI20 Linux repository.

Cc Daniel Schwierzeck <[email protected]>
Cc Paul Burton <[email protected]>
---
 arch/mips/dts/jz4780.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/mips/dts/jz4780.dtsi +20 -0
index b868b42..2b022c3 100644
@@ -44,6 +44,26 @@
 		#clock-cells = <1>;
 	};
 
+	msc0: msc at 13450000 {
+		compatible = "ingenic,jz4780-mmc";
+		reg = <0x13450000 0x1000>;
+
+		status = "disabled";
+
+		clocks = <&cgu JZ4780_CLK_MSC0>;
+		clock-names = "mmc";
+	};
+
+	msc1: msc at 13460000 {
+		compatible = "ingenic,jz4780-mmc";
+		reg = <0x13460000 0x1000>;
+
+		clocks = <&cgu JZ4780_CLK_MSC1>;
+		clock-names = "mmc";
+
+		status = "disabled";
+	};
+
 	uart0: serial at 10030000 {
 		compatible = "ingenic,jz4780-uart";
 		reg = <0x10030000 0x100>;
Signature · 1 line
2.7.0