Add initial support for Ingenic X1000 SoC and Y&A CU Neo board v4.
Subsystems (3)
1.Adjust the description in "devices.yaml" to make it more reasonable. 2.Adjust "model" in "cu1000.dts" to match the description in "devices.yaml". 3.Adjust "bool" in "Kconfig" to avoid duplicate names with subsequent boards. 4.Add pdma controller DT node and Update defconfig for pdma controller.
PATCH v4 1/6 MIPS: Ingenic: Initial X1000 support.
Support the Ingenic X1000 SoC using the code under arch/mips/jz4740. This is left unselectable in Kconfig until a X1000 based board is added in a later commit.
---
Notes:
v1->v2:
Rebase on top of mips-next, use ingenic-timer driver for system timer and clocksource.
v2->v3:
Drop the 'apb' node.
v3->v4:
Adjust the node order to make it consistent with other Ingenic boards.
arch/mips/boot/dts/ingenic/x1000.dtsi | 176 ++++++++++++++++++++++++++++++++++ arch/mips/jz4740/Kconfig | 6 ++ 2 files changed, 182 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/x1000.dtsi
arch/mips/boot/dts/ingenic/x1000.dtsi new file +176 -0
@@ -0,0 +1,176 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <dt-bindings/clock/x1000-cgu.h> + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "ingenic,x1000", "ingenic,x1000e"; + + cpuintc: interrupt-controller { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + compatible = "mti,cpu-interrupt-controller"; + }; + + intc: interrupt-controller@10001000 { + compatible = "ingenic,x1000-intc", "ingenic,jz4780-intc"; + reg = <0x10001000 0x50>; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-parent = <&cpuintc>; + interrupts = <2>; + }; + + exclk: ext { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + rtclk: rtc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; + + cgu: x1000-cgu@10000000 { + compatible = "ingenic,x1000-cgu"; + reg = <0x10000000 0x100>; + + #clock-cells = <1>; + + clocks = <&exclk>, <&rtclk>; + clock-names = "ext", "rtc"; + }; + + tcu: timer@10002000 { + compatible = "ingenic,x1000-tcu", + "ingenic,jz4770-tcu", + "simple-mfd"; + reg = <0x10002000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x10002000 0x1000>; + + #clock-cells = <1>; + + clocks = <&cgu X1000_CLK_RTCLK + &cgu X1000_CLK_EXCLK + &cgu X1000_CLK_PCLK>; + clock-names = "rtc", "ext", "pclk"; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-parent = <&intc>; + interrupts = <27 26 25>; + }; + + pinctrl: pin-controller@10010000 { + compatible = "ingenic,x1000-pinctrl"; + reg = <0x10010000 0x800>; + #address-cells = <1>; + #size-cells = <0>; + + gpa: gpio@0 { + compatible = "ingenic,x1000-gpio"; + reg = <0>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <17>; + }; + + gpb: gpio@1 { + compatible = "ingenic,x1000-gpio"; + reg = <1>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <16>; + }; + + gpc: gpio@2 { + compatible = "ingenic,x1000-gpio"; + reg = <2>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <15>; + }; + + gpd: gpio@3 { + compatible = "ingenic,x1000-gpio"; + reg = <3>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <14>; + }; + }; + + uart0: serial@10030000 { + compatible = "ingenic,x1000-uart"; + reg = <0x10030000 0x100>; + + interrupt-parent = <&intc>; + interrupts = <51>; + + clocks = <&exclk>, <&cgu X1000_CLK_UART0>; + clock-names = "baud", "module"; + + status = "disabled"; + }; + + uart1: serial@10031000 { + compatible = "ingenic,x1000-uart"; + reg = <0x10031000 0x100>; + + interrupt-parent = <&intc>; + interrupts = <50>; + + clocks = <&exclk>, <&cgu X1000_CLK_UART1>; + clock-names = "baud", "module"; + + status = "disabled"; + }; + + uart2: serial@10032000 { + compatible = "ingenic,x1000-uart"; + reg = <0x10032000 0x100>; + + interrupt-parent = <&intc>; + interrupts = <49>; + + clocks = <&exclk>, <&cgu X1000_CLK_UART2>; + clock-names = "baud", "module"; + + status = "disabled"; + }; +};
arch/mips/jz4740/Kconfig +6 -0
@@ -33,3 +33,9 @@ config MACH_JZ4780 select MIPS_CPU_SCACHE select SYS_HAS_CPU_MIPS32_R2 select SYS_SUPPORTS_HIGHMEM + +config MACH_X1000 + bool + select MIPS_CPU_SCACHE + select SYS_HAS_CPU_MIPS32_R2 + select SYS_SUPPORTS_HIGHMEM
Signature · 1 line
2.7.4
PATCH v4 2/6 dt-bindings: Document yna vendor-prefix.
In reply to Zhou YanjieThe "yna" is an acronym of the "YSH & ATIL".
---
Notes:
v1->v2:
No change.
v2->v3:
No change.
v3->v4:
No change.Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -1054,6 +1054,8 @@ patternProperties: description: Xilinx "^xunlong,.*": description: Shenzhen Xunlong Software CO.,Limited + "^yna,.*": + description: YSH & ATIL "^yones-toptech,.*": description: Yones Toptech Co., Ltd. "^ysoft,.*":
Signature · 1 line
2.7.4
PATCH v4 3/6 dt-bindings: MIPS: Add Ingenic XBurst based boards.
In reply to Zhou YanjieAdd Ingenic XBurst based boards, prepare for later dts.
---
Notes:
v1->v2:
No change.
v2->v3:
No change.
v3->v4:
Adjust the description to make it more reasonable..../devicetree/bindings/mips/ingenic/devices.yaml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/mips/ingenic/devices.yaml
Documentation/devicetree/bindings/mips/ingenic/devices.yaml new file +35 -0
@@ -0,0 +1,35 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mips/ingenic/devices.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ingenic XBurst based Platforms Device Tree Bindings + +maintainers: + - Zhou Yanjie <[email protected]> +description: | + Devices with a Ingenic XBurst CPU shall have the following properties. + +properties: + $nodename: + const: '/' + compatible: + oneOf: + + - description: Qi Hardware Ben NanoNote + items: + - const: qi,lb60 + + - description: Game Consoles Worldwide GCW Zero + items: + - const: gcw,zero + + - description: MIPS Creator CI20 + items: + - const: img,ci20 + + - description: YSH & ATIL General Board CU Neo + items: + - const: yna,cu1000 +...
Signature · 1 line
2.7.4
PATCH v4 4/6 MIPS: Ingenic: Initial YSH & ATIL CU Neo board support.
In reply to Zhou YanjieAdd a device tree for the Ingenic X1000 based YSH & ATIL CU Neo board. Note that this is unselectable via Kconfig until the X1000 SoC is made selectable in a later commit.
---
Notes:
v1->v2:
Rebase on top of mips-next, use TCU for system timer and clocksource.
v2->v3:
No change.
v3->v4:
1.Adjust "model" in "cu1000.dts" to match the description in "devices.yaml". 2.Adjust "bool" in "Kconfig" to avoid duplicate names with subsequent boards.
arch/mips/boot/dts/ingenic/Makefile | 1 + arch/mips/boot/dts/ingenic/cu1000.dts | 52 ++++++++++++++++++ arch/mips/configs/cu1000_defconfig | 100 ++++++++++++++++++++++++++++++++++ arch/mips/jz4740/Kconfig | 4 ++ 4 files changed, 157 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/cu1000.dts create mode 100644 arch/mips/configs/cu1000_defconfig
arch/mips/boot/dts/ingenic/Makefile +1 -0
@@ -2,5 +2,6 @@ dtb-$(CONFIG_JZ4740_QI_LB60) += qi_lb60.dtb dtb-$(CONFIG_JZ4770_GCW0) += gcw0.dtb dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb +dtb-$(CONFIG_X1000_CU1000) += cu1000.dtb obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
arch/mips/boot/dts/ingenic/cu1000.dts new file +52 -0
52 lines not on this page · raw message
arch/mips/configs/cu1000_defconfig new file +100 -0
100 lines not on this page · raw message
arch/mips/jz4740/Kconfig +4 -0
@@ -16,6 +16,10 @@ config JZ4780_CI20 bool "MIPS Creator CI20" select MACH_JZ4780 +config X1000_CU1000 + bool "YSH & ATIL General Module CU1000" + select MACH_X1000 + endchoice config MACH_JZ4740
Signature · 1 line
2.7.4
Paul Cercueil
maintainerRe: [PATCH v4 4/6] MIPS: Ingenic: Initial YSH & ATIL CU Neo board support.
Hi Zhou,
Quoted 83 lines · Zhou Yanjie
Add a device tree for the Ingenic X1000 based YSH & ATIL CU Neo board. Note that this is unselectable via
Kconfiguntil the X1000 SoC is made selectable in a later commit.Signed-off-by Zhou Yanjie <[email protected]>---
Notes:
v1->v2:
Rebase on top of mips-next, use TCU for system timer and
clocksource.v2->v3: No change. v3->v4: 1.Adjust "model" in "cu1000.dts" to match the description in"
devices.yaml".
2.Adjust "bool" in "Kconfig" to avoid duplicate names with
subsequent boards.arch/mips/boot/dts/ingenic/Makefile | 1 + arch/mips/boot/dts/ingenic/cu1000.dts | 52 ++++++++++++++++++ arch/mips/configs/cu1000_defconfig | 100 ++++++++++++++++++++++++++++++++++ arch/mips/jz4740/Kconfig | 4 ++ 4 files changed, 157 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/cu1000.dts create mode 100644 arch/mips/configs/cu1000_defconfigarch/mips/boot/dts/ingenic/Makefile +1
-0@@ -2,5 +2,6 @@ dtb-$(CONFIG_JZ4740_QI_LB60) += qi_lb60.dtb dtb-$(CONFIG_JZ4770_GCW0) += gcw0.dtb dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb +dtb-$(CONFIG_X1000_CU1000) += cu1000.dtb obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))arch/mips/boot/dts/ingenic/cu1000.dts new file +35
-0@@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "x1000.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/clock/ingenic,tcu.h> + +/ { + compatible = "yna,cu1000", "ingenic,x1000"; + model = "YSH & ATIL General Board CU Neo"; + + aliases { + serial2 = &uart2; + }; + + chosen { + stdout-path = &uart2; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x04000000>; + }; +}; + +&exclk { + clock-frequency = <24000000>; +}; + +&tcu { + /* 1500 kHz for the system timer and clocksource */ + assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; + assigned-clock-rates = <1500000>, <1500000>; + + /* Use channel #1 for the system timer channel #2 for theclocksource */
arch/mips/boot/dts/ingenic/cu1000.dts line 36
Quoted 1 line
arch/mips/boot/dts/ingenic/cu1000.dts new file +1
-0+ ingenic,pwm-channels-mask = <0xfa>;
From the mask used, I'm gessing that you're reserving channels #0 and #2, not #1 and #2.
Quoted 44 lines
arch/mips/boot/dts/ingenic/cu1000.dts new file +16
-0+}; + +&uart2 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart2>; +}; + +&pinctrl { + pins_uart2: uart2 { + function = "uart2"; + groups = "uart2-data-d"; + bias-disable; + }; +};arch/mips/configs/cu1000_defconfig new file +22
-0@@ -0,0 +1,100 @@ +CONFIG_LOCALVERSION_AUTO=y +CONFIG_KERNEL_GZIP=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_KMEM=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="arch/mips/boot/ramdisk.cpio.gz" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL_SYSCALL=y
arch/mips/configs/cu1000_defconfig line 32
Quoted 10 lines
arch/mips/configs/cu1000_defconfig new file +10
-0+CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +CONFIG_MACH_INGENIC=y +CONFIG_X1000_CU1000=y +CONFIG_HIGHMEM=y +CONFIG_HZ_100=y +CONFIG_HZ=100
This line looks malformed.
Quoted 67 lines
arch/mips/configs/cu1000_defconfig new file +67
-0+# CONFIG_SECCOMP is not set +# CONFIG_SUSPEND is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_COMPACTION is not set +CONFIG_CMA=y +CONFIG_CMA_AREAS=7 +CONFIG_UEVENT_HELPER=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +# CONFIG_FW_LOADER is not set +# CONFIG_ALLOW_DEV_COREDUMP is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_LEGACY_PTY_COUNT=2 +CONFIG_SERIAL_EARLYCON=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=3 +CONFIG_SERIAL_8250_RUNTIME_UARTS=3 +CONFIG_SERIAL_8250_INGENIC=y +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_HW_RANDOM is not set +CONFIG_GPIO_SYSFS=y +# CONFIG_HWMON is not set +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +# CONFIG_VGA_CONSOLE is not set +# CONFIG_HID is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_NVMEM=y +CONFIG_NVMEM_SYSFS=y +CONFIG_EXT4_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_PROC_KCORE=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_TMPFS=y +CONFIG_CONFIGFS_FS=y +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_936=y +CONFIG_NLS_CODEPAGE_950=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_UTF8=y +CONFIG_CRYPTO_ECHAINIV=y +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 +CONFIG_CONSOLE_LOGLEVEL_QUIET=15 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 +CONFIG_DEBUG_INFO=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_PANIC_ON_OOPS=y +CONFIG_PANIC_TIMEOUT=10 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_PREEMPT is not set +CONFIG_STACKTRACE=y +# CONFIG_FTRACE is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttyS2,115200n8 mem=32M@0x0 earlycon
Quoted 1 line
clk_ignore_unused"
You already specify the stdout-path in the devicetree, no need to pass the "console" parameter.
For the "mem" parameter, it's already set in the devicetree, so no need to set it again here. Besides, in the devicetree it is set to 64 MiB.
Why is clk_ignore_unused needed?
Cheers,
-Paul
Quoted 20 lines
arch/mips/configs/cu1000_defconfig new file +1
-0+CONFIG_CMDLINE_OVERRIDE=yarch/mips/jz4740/Kconfig +4
-1@@ -16,6 +16,10 @@ config JZ4780_CI20 bool "MIPS Creator CI20" select MACH_JZ4780 +config X1000_CU1000 + bool "YSH & ATIL General Module CU1000" + select MACH_X1000 + endchoice config MACH_JZ4740 --2.7.4
Re: [PATCH v4 4/6] MIPS: Ingenic: Initial YSH & ATIL CU Neo board support.
Hi Paul,
Quoted 82 lines · Paul Cercueil
Hi Zhou,
Quoted 78 lines · Zhou Yanjie
Add a device tree for the Ingenic X1000 based YSH & ATIL CU Neo board. Note that this is unselectable via
Kconfiguntil the X1000 SoC is made selectable in a later commit.Signed-off-by Zhou Yanjie <[email protected]>---
Notes:
v1->v2:
Rebase on top of mips-next, use TCU for system timer and
clocksource.v2->v3: No change. v3->v4: 1.Adjust "model" in "cu1000.dts" to match the description in"
devices.yaml".
2.Adjust "bool" in "Kconfig" to avoid duplicate names with
subsequent boards.arch/mips/boot/dts/ingenic/Makefile | 1 + arch/mips/boot/dts/ingenic/cu1000.dts | 52 ++++++++++++++++++ arch/mips/configs/cu1000_defconfig | 100 ++++++++++++++++++++++++++++++++++ arch/mips/jz4740/Kconfig | 4 ++ 4 files changed, 157 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/cu1000.dts create mode 100644 arch/mips/configs/cu1000_defconfigarch/mips/boot/dts/ingenic/Makefile +1
-0@@ -2,5 +2,6 @@ dtb-$(CONFIG_JZ4740_QI_LB60) += qi_lb60.dtb dtb-$(CONFIG_JZ4770_GCW0) += gcw0.dtb dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb +dtb-$(CONFIG_X1000_CU1000) += cu1000.dtb obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))arch/mips/boot/dts/ingenic/cu1000.dts new file +31
-0@@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "x1000.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/clock/ingenic,tcu.h> + +/ { + compatible = "yna,cu1000", "ingenic,x1000"; + model = "YSH & ATIL General Board CU Neo"; + + aliases { + serial2 = &uart2; + }; + + chosen { + stdout-path = &uart2; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x04000000>; + }; +}; + +&exclk { + clock-frequency = <24000000>; +}; + +&tcu { + /* 1500 kHz for the system timer and clocksource */
Quoted 9 lines
Quoted 6 lines
arch/mips/boot/dts/ingenic/cu1000.dts new file +4
-0+ assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; + assigned-clock-rates = <1500000>, <1500000>; + + /* Use channel #1 for the system timer channel #2 for theclocksource */
+ ingenic,pwm-channels-mask = <0xfa>;From the mask used, I'm gessing that you're reserving channels #0 and #2, not #1 and #2.
My fault, you are right, it use channels #0 and #2.
Quoted 48 lines
Quoted 48 lines
arch/mips/boot/dts/ingenic/cu1000.dts new file +16
-0+}; + +&uart2 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart2>; +}; + +&pinctrl { + pins_uart2: uart2 { + function = "uart2"; + groups = "uart2-data-d"; + bias-disable; + }; +};arch/mips/configs/cu1000_defconfig new file +26
-0@@ -0,0 +1,100 @@ +CONFIG_LOCALVERSION_AUTO=y +CONFIG_KERNEL_GZIP=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_KMEM=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="arch/mips/boot/ramdisk.cpio.gz" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not set
Quoted 8 lines
arch/mips/configs/cu1000_defconfig line 32
Quoted 6 lines
arch/mips/configs/cu1000_defconfig new file +6
-0+CONFIG_SLAB=y +CONFIG_MACH_INGENIC=y +CONFIG_X1000_CU1000=y +CONFIG_HIGHMEM=y +CONFIG_HZ_100=y +CONFIG_HZ=100This line looks malformed.
Ok, I'll remove it in v7.
Quoted 63 lines
Quoted 63 lines
arch/mips/configs/cu1000_defconfig new file +62
-0+# CONFIG_SECCOMP is not set +# CONFIG_SUSPEND is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_COMPACTION is not set +CONFIG_CMA=y +CONFIG_CMA_AREAS=7 +CONFIG_UEVENT_HELPER=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +# CONFIG_FW_LOADER is not set +# CONFIG_ALLOW_DEV_COREDUMP is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_LEGACY_PTY_COUNT=2 +CONFIG_SERIAL_EARLYCON=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=3 +CONFIG_SERIAL_8250_RUNTIME_UARTS=3 +CONFIG_SERIAL_8250_INGENIC=y +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_HW_RANDOM is not set +CONFIG_GPIO_SYSFS=y +# CONFIG_HWMON is not set +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +# CONFIG_VGA_CONSOLE is not set +# CONFIG_HID is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_NVMEM=y +CONFIG_NVMEM_SYSFS=y +CONFIG_EXT4_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_PROC_KCORE=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_TMPFS=y +CONFIG_CONFIGFS_FS=y +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_936=y +CONFIG_NLS_CODEPAGE_950=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_UTF8=y +CONFIG_CRYPTO_ECHAINIV=y +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 +CONFIG_CONSOLE_LOGLEVEL_QUIET=15 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 +CONFIG_DEBUG_INFO=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_PANIC_ON_OOPS=y +CONFIG_PANIC_TIMEOUT=10 +# CONFIG_SCHED_DEBUG is not set
Quoted 9 lines
Quoted 6 lines
arch/mips/configs/cu1000_defconfig new file +5
-0+# CONFIG_DEBUG_PREEMPT is not set +CONFIG_STACKTRACE=y +# CONFIG_FTRACE is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttyS2,115200n8 mem=32M@0x0 earlycon
clk_ignore_unused"You already specify the stdout-path in the devicetree, no need to pass the "console" parameter.
According the test log , if remove "console=ttyS2,115200n8", serial will not initialized and will stuck after:
[ 0.016815] printk: bootconsole [x1000_uart0] disabled
if remove both "console=ttyS2,115200n8" and "earlycon" it will stuck after:
Starting kernel ...
So I think both the "earlycon" and the "console=ttyS2,115200n8 earlycon" should be retained.
Quoted 2 lines
For the "mem" parameter, it's already set in the devicetree, so no need to set it again here. Besides, in the devicetree it is set to 64 MiB.
Ok, I'll remove them in v7.
Quoted 2 lines
Why is
clk_ignore_unusedneeded?
In fact, I also don't know why "clk_ignore_unused" needed. This part of the parameter is copied from ci20_defconfig, but according to the test, if remove "clk_ignore_unused", it will stuck after :
[ 0.374361] printk: bootconsole [x1000_uart0] disabled
Differeent from the case where "console=ttyS2,115200n8" is removed, the serial is successfully initialized this time.
So I think "clk_ignore_unused" should be retained.
Thanks and best regards!
Quoted 26 lines
Cheers,
-PaulQuoted 20 lines
arch/mips/configs/cu1000_defconfig new file +1
-0+CONFIG_CMDLINE_OVERRIDE=yarch/mips/jz4740/Kconfig +4
-0@@ -16,6 +16,10 @@ config JZ4780_CI20 bool "MIPS Creator CI20" select MACH_JZ4780 +config X1000_CU1000 + bool "YSH & ATIL General Module CU1000" + select MACH_X1000 + endchoice config MACH_JZ4740Signature · 1 line
2.7.4
Paul Cercueil
maintainerRe: [PATCH v4 4/6] MIPS: Ingenic: Initial YSH & ATIL CU Neo board support.
Hi Zhou,
Quoted 232 lines · Zhou Yanjie
Hi Paul,
Quoted 82 lines · Paul Cercueil
Hi Zhou,
Le mer., nov. 27, 2019 at 01:06, Zhou Yanjie <[email protected]> a écrit :
Quoted 78 lines
Add a device tree for the Ingenic X1000 based YSH & ATIL CU Neo board. Note that this is unselectable via
Kconfiguntil the X1000 SoC is made selectable in a later commit.Signed-off-by Zhou Yanjie <[email protected]>---
Notes:
v1->v2:
Rebase on top of mips-next, use TCU for system timer and
clocksource.v2->v3: No change. v3->v4: 1.Adjust "model" in "cu1000.dts" to match the description in"devices.yaml".
2.Adjust "bool" in "Kconfig" to avoid duplicate names with
subsequent boards.arch/mips/boot/dts/ingenic/Makefile | 1 + arch/mips/boot/dts/ingenic/cu1000.dts | 52 ++++++++++++++++++ arch/mips/configs/cu1000_defconfig | 100 ++++++++++++++++++++++++++++++++++ arch/mips/jz4740/Kconfig | 4 ++ 4 files changed, 157 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/cu1000.dts create mode 100644 arch/mips/configs/cu1000_defconfigarch/mips/boot/dts/ingenic/Makefile +1
-0@@ -2,5 +2,6 @@ dtb-$(CONFIG_JZ4740_QI_LB60) += qi_lb60.dtb dtb-$(CONFIG_JZ4770_GCW0) += gcw0.dtb dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb +dtb-$(CONFIG_X1000_CU1000) += cu1000.dtb obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))arch/mips/boot/dts/ingenic/cu1000.dts new file +31
-0@@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "x1000.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/clock/ingenic,tcu.h> + +/ { + compatible = "yna,cu1000", "ingenic,x1000"; + model = "YSH & ATIL General Board CU Neo"; + + aliases { + serial2 = &uart2; + }; + + chosen { + stdout-path = &uart2; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x04000000>; + }; +}; + +&exclk { + clock-frequency = <24000000>; +}; + +&tcu { + /* 1500 kHz for the system timer and clocksource */Quoted 9 lines
Quoted 6 lines
arch/mips/boot/dts/ingenic/cu1000.dts new file +4
-0+ assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; + assigned-clock-rates = <1500000>, <1500000>; + + /* Use channel #1 for the system timer channel #2 for theclocksource */
+ ingenic,pwm-channels-mask = <0xfa>;From the mask used, I'm gessing that you're reserving channels #0 and #2, not #1 and #2.
My fault, you are right, it use channels #0 and #2.
Quoted 48 lines
Quoted 48 lines
arch/mips/boot/dts/ingenic/cu1000.dts new file +16
-0+}; + +&uart2 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart2>; +}; + +&pinctrl { + pins_uart2: uart2 { + function = "uart2"; + groups = "uart2-data-d"; + bias-disable; + }; +};arch/mips/configs/cu1000_defconfig new file +26
-0@@ -0,0 +1,100 @@ +CONFIG_LOCALVERSION_AUTO=y +CONFIG_KERNEL_GZIP=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_KMEM=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="arch/mips/boot/ramdisk.cpio.gz" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not setQuoted 8 lines
arch/mips/configs/cu1000_defconfig line 32
Quoted 6 lines
arch/mips/configs/cu1000_defconfig new file +6
-0+CONFIG_SLAB=y +CONFIG_MACH_INGENIC=y +CONFIG_X1000_CU1000=y +CONFIG_HIGHMEM=y +CONFIG_HZ_100=y +CONFIG_HZ=100This line looks malformed.
Ok, I'll remove it in v7.
Quoted 63 lines
Quoted 63 lines
arch/mips/configs/cu1000_defconfig new file +62
-0+# CONFIG_SECCOMP is not set +# CONFIG_SUSPEND is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_COMPACTION is not set +CONFIG_CMA=y +CONFIG_CMA_AREAS=7 +CONFIG_UEVENT_HELPER=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +# CONFIG_FW_LOADER is not set +# CONFIG_ALLOW_DEV_COREDUMP is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_LEGACY_PTY_COUNT=2 +CONFIG_SERIAL_EARLYCON=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=3 +CONFIG_SERIAL_8250_RUNTIME_UARTS=3 +CONFIG_SERIAL_8250_INGENIC=y +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_HW_RANDOM is not set +CONFIG_GPIO_SYSFS=y +# CONFIG_HWMON is not set +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +# CONFIG_VGA_CONSOLE is not set +# CONFIG_HID is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_NVMEM=y +CONFIG_NVMEM_SYSFS=y +CONFIG_EXT4_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_PROC_KCORE=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_TMPFS=y +CONFIG_CONFIGFS_FS=y +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_936=y +CONFIG_NLS_CODEPAGE_950=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_UTF8=y +CONFIG_CRYPTO_ECHAINIV=y +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 +CONFIG_CONSOLE_LOGLEVEL_QUIET=15 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 +CONFIG_DEBUG_INFO=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_PANIC_ON_OOPS=y +CONFIG_PANIC_TIMEOUT=10 +# CONFIG_SCHED_DEBUG is not setQuoted 9 lines
Quoted 6 lines
arch/mips/configs/cu1000_defconfig new file +5
-0+# CONFIG_DEBUG_PREEMPT is not set +CONFIG_STACKTRACE=y +# CONFIG_FTRACE is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttyS2,115200n8 mem=32M@0x0 earlyconclk_ignore_unused"
You already specify the stdout-path in the devicetree, no need to pass the "console" parameter.
According the test log , if remove "console=ttyS2,115200n8", serial will not initialized and will stuck after:
Quoted 7 lines
[ 0.016815] printk: bootconsole [x1000_uart0] disabledif remove both "console=ttyS2,115200n8" and "earlycon" it will stuck after:
Starting kernel ...
So I think both the "earlycon" and the "console=ttyS2,115200n8 earlycon" should be retained.
There must be something wrong with your kernel config. It works here.
Use this as your stdout-path: "serial2:115200n8", unset CONFIG_CMDLINE_OVERRIDE, enable MIPS_CMDLINE_DTB_EXTEND, and just use "earlycon clk_ignore_unused" in the devicetree's bootargs. That should do it.
Quoted 14 lines
Quoted 3 lines
For the "mem" parameter, it's already set in the devicetree, so no need to set it again here. Besides, in the devicetree it is set to 64 MiB.
Ok, I'll remove them in v7.
Quoted 2 lines
Why is
clk_ignore_unusedneeded?In fact, I also don't know why "
clk_ignore_unused" needed. This part of the parameter is copied fromci20_defconfig, but according to the test, if remove "clk_ignore_unused", it will stuck after :
Quoted 6 lines
[ 0.374361] printk: bootconsole [x1000_uart0] disabledDiffereent from the case where "console=ttyS2,115200n8" is removed, the serial is successfully initialized this time.
So I think "
clk_ignore_unused" should be retained.
It locks up because Linux disables a clock that is required for the system. This clock should be requested and enabled by a client driver. Could you investigate which clock is the problem?
@Paul Burton: do you remember why it was needed on CI20?
In the meantime I suppose "clk_ignore_unused" is fine.
Cheers,
-Paul
Quoted 26 lines
Quoted 23 lines
Quoted 21 lines
arch/mips/configs/cu1000_defconfig new file +1
-0+CONFIG_CMDLINE_OVERRIDE=yarch/mips/jz4740/Kconfig +4
-1@@ -16,6 +16,10 @@ config JZ4780_CI20 bool "MIPS Creator CI20" select MACH_JZ4780 +config X1000_CU1000 + bool "YSH & ATIL General Module CU1000" + select MACH_X1000 + endchoice config MACH_JZ4740 --2.7.4
Re: [PATCH v4 4/6] MIPS: Ingenic: Initial YSH & ATIL CU Neo board support.
Hi Paul,
Quoted 240 lines · Paul Cercueil
Hi Zhou,
Quoted 236 lines · Zhou Yanjie
Hi Paul,
Quoted 82 lines · Paul Cercueil
Hi Zhou,
Le mer., nov. 27, 2019 at 01:06, Zhou Yanjie <[email protected]> a écrit :
Quoted 78 lines
Add a device tree for the Ingenic X1000 based YSH & ATIL CU Neo board. Note that this is unselectable via
Kconfiguntil the X1000 SoC is made selectable in a later commit.Signed-off-by Zhou Yanjie <[email protected]>---
Notes:
v1->v2:
Rebase on top of mips-next, use TCU for system timer and
clocksource.v2->v3: No change. v3->v4: 1.Adjust "model" in "cu1000.dts" to match the description in"devices.yaml".
2.Adjust "bool" in "Kconfig" to avoid duplicate names with
subsequent boards.arch/mips/boot/dts/ingenic/Makefile | 1 + arch/mips/boot/dts/ingenic/cu1000.dts | 52 ++++++++++++++++++ arch/mips/configs/cu1000_defconfig | 100 ++++++++++++++++++++++++++++++++++ arch/mips/jz4740/Kconfig | 4 ++ 4 files changed, 157 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/cu1000.dts create mode 100644 arch/mips/configs/cu1000_defconfigarch/mips/boot/dts/ingenic/Makefile +1
-0@@ -2,5 +2,6 @@ dtb-$(CONFIG_JZ4740_QI_LB60) += qi_lb60.dtb dtb-$(CONFIG_JZ4770_GCW0) += gcw0.dtb dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb +dtb-$(CONFIG_X1000_CU1000) += cu1000.dtb obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))arch/mips/boot/dts/ingenic/cu1000.dts new file +31
-0@@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "x1000.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/clock/ingenic,tcu.h> + +/ { + compatible = "yna,cu1000", "ingenic,x1000"; + model = "YSH & ATIL General Board CU Neo"; + + aliases { + serial2 = &uart2; + }; + + chosen { + stdout-path = &uart2; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x04000000>; + }; +}; + +&exclk { + clock-frequency = <24000000>; +}; + +&tcu { + /* 1500 kHz for the system timer and clocksource */Quoted 9 lines
Quoted 6 lines
arch/mips/boot/dts/ingenic/cu1000.dts new file +4
-0+ assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; + assigned-clock-rates = <1500000>, <1500000>; + + /* Use channel #1 for the system timer channel #2 for theclocksource */
+ ingenic,pwm-channels-mask = <0xfa>;From the mask used, I'm gessing that you're reserving channels #0 and #2, not #1 and #2.
My fault, you are right, it use channels #0 and #2.
Quoted 48 lines
Quoted 48 lines
arch/mips/boot/dts/ingenic/cu1000.dts new file +16
-0+}; + +&uart2 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart2>; +}; + +&pinctrl { + pins_uart2: uart2 { + function = "uart2"; + groups = "uart2-data-d"; + bias-disable; + }; +};arch/mips/configs/cu1000_defconfig new file +26
-0@@ -0,0 +1,100 @@ +CONFIG_LOCALVERSION_AUTO=y +CONFIG_KERNEL_GZIP=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_KMEM=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="arch/mips/boot/ramdisk.cpio.gz" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not setQuoted 8 lines
arch/mips/configs/cu1000_defconfig line 32
Quoted 6 lines
arch/mips/configs/cu1000_defconfig new file +6
-0+CONFIG_SLAB=y +CONFIG_MACH_INGENIC=y +CONFIG_X1000_CU1000=y +CONFIG_HIGHMEM=y +CONFIG_HZ_100=y +CONFIG_HZ=100This line looks malformed.
Ok, I'll remove it in v7.
Quoted 63 lines
Quoted 63 lines
arch/mips/configs/cu1000_defconfig new file +62
-0+# CONFIG_SECCOMP is not set +# CONFIG_SUSPEND is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_COMPACTION is not set +CONFIG_CMA=y +CONFIG_CMA_AREAS=7 +CONFIG_UEVENT_HELPER=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +# CONFIG_FW_LOADER is not set +# CONFIG_ALLOW_DEV_COREDUMP is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_LEGACY_PTY_COUNT=2 +CONFIG_SERIAL_EARLYCON=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=3 +CONFIG_SERIAL_8250_RUNTIME_UARTS=3 +CONFIG_SERIAL_8250_INGENIC=y +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_HW_RANDOM is not set +CONFIG_GPIO_SYSFS=y +# CONFIG_HWMON is not set +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +# CONFIG_VGA_CONSOLE is not set +# CONFIG_HID is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_NVMEM=y +CONFIG_NVMEM_SYSFS=y +CONFIG_EXT4_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_PROC_KCORE=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_TMPFS=y +CONFIG_CONFIGFS_FS=y +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_936=y +CONFIG_NLS_CODEPAGE_950=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_UTF8=y +CONFIG_CRYPTO_ECHAINIV=y +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 +CONFIG_CONSOLE_LOGLEVEL_QUIET=15 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 +CONFIG_DEBUG_INFO=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_PANIC_ON_OOPS=y +CONFIG_PANIC_TIMEOUT=10 +# CONFIG_SCHED_DEBUG is not setQuoted 9 lines
Quoted 6 lines
arch/mips/configs/cu1000_defconfig new file +5
-0+# CONFIG_DEBUG_PREEMPT is not set +CONFIG_STACKTRACE=y +# CONFIG_FTRACE is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttyS2,115200n8 mem=32M@0x0 earlyconclk_ignore_unused"
You already specify the stdout-path in the devicetree, no need to pass the "console" parameter.
According the test log , if remove "console=ttyS2,115200n8", serial will not initialized and will stuck after:
[ 0.016815] printk: bootconsole [x1000_uart0] disabledif remove both "console=ttyS2,115200n8" and "earlycon" it will stuck after:
Quoted 8 lines
Quoted 3 lines
Starting kernel ...
So I think both the "earlycon" and the "console=ttyS2,115200n8 earlycon" should be retained.
There must be something wrong with your kernel config. It works here.
Use this as your stdout-path: "serial2:115200n8", unset
CONFIG_CMDLINE_OVERRIDE, enableMIPS_CMDLINE_DTB_EXTEND, and just use "earlyconclk_ignore_unused" in the devicetree's bootargs. That should do it.
It works, I will change it in v6.
Quoted 14 lines
Quoted 14 lines
Quoted 3 lines
For the "mem" parameter, it's already set in the devicetree, so no need to set it again here. Besides, in the devicetree it is set to 64 MiB.
Ok, I'll remove them in v7.
Quoted 2 lines
Why is
clk_ignore_unusedneeded?In fact, I also don't know why "
clk_ignore_unused" needed. This part of the parameter is copied fromci20_defconfig, but according to the test, if remove "clk_ignore_unused", it will stuck after :
Quoted 9 lines
Quoted 6 lines
[ 0.374361] printk: bootconsole [x1000_uart0] disabledDiffereent from the case where "console=ttyS2,115200n8" is removed, the serial is successfully initialized this time.
So I think "
clk_ignore_unused" should be retained.It locks up because Linux disables a clock that is required for the system. This clock should be requested and enabled by a client driver. Could you investigate which clock is the problem?
I also don't have any good ideas now, but I will try to investigate it.
Thanks and best regards!
Quoted 35 lines
@Paul Burton: do you remember why it was needed on CI20?
In the meantime I suppose "
clk_ignore_unused" is fine.Cheers,
-PaulQuoted 26 lines
Quoted 23 lines
Quoted 21 lines
arch/mips/configs/cu1000_defconfig new file +1
-0+CONFIG_CMDLINE_OVERRIDE=yarch/mips/jz4740/Kconfig +4
-0@@ -16,6 +16,10 @@ config JZ4780_CI20 bool "MIPS Creator CI20" select MACH_JZ4780 +config X1000_CU1000 + bool "YSH & ATIL General Module CU1000" + select MACH_X1000 + endchoice config MACH_JZ4740Signature · 1 line
2.7.4
PATCH v4 5/6 MIPS: X1000: Add pdma controller DT node.
In reply to Zhou YanjieAdd the appropriate DT node to probe the pdma controller driver using the devicetree.
---
Notes:
v4:
New patch.arch/mips/boot/dts/ingenic/x1000.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/mips/boot/dts/ingenic/x1000.dtsi +13 -0
@@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include <dt-bindings/clock/x1000-cgu.h> +#include <dt-bindings/dma/x1000-dma.h> / { #address-cells = <1>;
@@ -173,4 +174,16 @@ status = "disabled"; }; + + pdma: dma-controller@13420000 { + compatible = "ingenic,x1000-dma"; + reg = <0x13420000 0x400 + 0x13421000 0x40>; + #dma-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <10>; + + clocks = <&cgu X1000_CLK_PDMA>; + }; };
Signature · 1 line
2.7.4
Paul Cercueil
maintainerRe: [PATCH v4 5/6] MIPS: X1000: Add pdma controller DT node.
Hi Zhou,
Quoted 18 lines · Zhou Yanjie
Add the appropriate DT node to probe the pdma controller driver using the devicetree.
Signed-off-by Zhou Yanjie <[email protected]>---
Notes:
v4: New patch.arch/mips/boot/dts/ingenic/x1000.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)arch/mips/boot/dts/ingenic/x1000.dtsi +0
-0
arch/mips/boot/dts/ingenic/x1000.dtsi line 3
Quoted 3 lines
arch/mips/boot/dts/ingenic/x1000.dtsi +1
-0@@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include <dt-bindings/clock/x1000-cgu.h> +#include <dt-bindings/dma/x1000-dma.h>
You're not using any macro from that include file, so there's no need to have it here.
Cheers,
-Paul
Quoted 24 lines
arch/mips/boot/dts/ingenic/x1000.dtsi +12
-1/ { #address-cells = <1>;@@ -173,4 +174,16 @@ status = "disabled"; }; + + pdma: dma-controller@13420000 { + compatible = "ingenic,x1000-dma"; + reg = <0x13420000 0x400 + 0x13421000 0x40>; + #dma-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <10>; + + clocks = <&cgu X1000_CLK_PDMA>; + }; }; --2.7.4
Re: [PATCH v4 5/6] MIPS: X1000: Add pdma controller DT node.
Hi Paul,
Quoted 17 lines · Paul Cercueil
Hi Zhou,
Quoted 13 lines · Zhou Yanjie
Add the appropriate DT node to probe the pdma controller driver using the devicetree.
Signed-off-by Zhou Yanjie <[email protected]>---
Notes:
v4: New patch.arch/mips/boot/dts/ingenic/x1000.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Quoted 11 lines
arch/mips/boot/dts/ingenic/x1000.dtsi line 3
Quoted 8 lines
arch/mips/boot/dts/ingenic/x1000.dtsi +1
-0@@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include <dt-bindings/clock/x1000-cgu.h> +#include <dt-bindings/dma/x1000-dma.h>You're not using any macro from that include file, so there's no need to have it here.
Sure, I will fix this in v7.
Thanks and best regards!
Quoted 30 lines
Cheers,
-PaulQuoted 24 lines
arch/mips/boot/dts/ingenic/x1000.dtsi +12
-0/ { #address-cells = <1>;@@ -173,4 +174,16 @@ status = "disabled"; }; + + pdma: dma-controller@13420000 { + compatible = "ingenic,x1000-dma"; + reg = <0x13420000 0x400 + 0x13421000 0x40>; + #dma-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <10>; + + clocks = <&cgu X1000_CLK_PDMA>; + }; };Signature · 1 line
2.7.4
PATCH v4 6/6 MIPS: CU1000: Update defconfig for pdma controller.
In reply to Zhou YanjieSelected pdma controller support by default.
---
Notes:
v4:
New patch.arch/mips/configs/cu1000_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/mips/configs/cu1000_defconfig +2 -0
@@ -62,6 +62,8 @@ CONFIG_GPIO_SYSFS=y # CONFIG_VGA_CONSOLE is not set # CONFIG_HID is not set # CONFIG_USB_SUPPORT is not set +CONFIG_DMADEVICES=y +CONFIG_DMA_JZ4780=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_NVMEM=y CONFIG_NVMEM_SYSFS=y
Signature · 1 line
2.7.4