arm: sunplus: add Tibbo LTPP3G2 board support
Subsystems (3)
v5 cover arm: sunplus: add Tibbo LTPP3G2 board support
The Tibbo LTPP3G2 is a board based on the Sunplus SP7021 SoC:
https://tibbo.com/store/tps/ltpp3g2.html
It is the platform that underpins Tibbo's industrial IoT products.
This series adds board support to linux-next:
- Patch 1: vendor prefix for Tibbo Technology.
- Patch 2: document tibbo,ltpp3g2 compatible string in the SP7021 board binding.
- Patch 3: add device tree nodes for SP7021 peripherals that have drivers (PWM, watchdog, eMMC), plus a label on the gpio-leds node so board DTS files can override it.
Also: move memory@0 to the DTSI (512MB is fixed in the SP7021 package), and remove unused board-specific pinmux nodes (emac_pins, sdcard_pins) from the DTSI.
- Patch 4: enable SMP via PSCI 0.2 (SMC) on the SP7021.
- Patch 5: add the board DTS for the LTPP3G2, covering eMMC, a bit-banged I2C bus, PWM, watchdog, and two GPIO LEDs.
- Patch 6: update sp7021_defconfig to enable the drivers used by the LTPP3G2 and correct a few defaults.
Tested on LTPP3G2 hardware on linux-next-20260916.
Changes in v5:
- fix a problem reported by sashiko-bot:
- update patch 3's commit message to explain the removal of emac_pins and sdcard_pins (unused board-specific nodes not belonging in the SoC DTSI) and the move of emmc_pins to the board DTS
Changes in v4:
- fix problems reported by sashiko-bot
- fix PSCI method: use smc (confirmed by boot log: "SMC Calling Convention v1.0")
- move board-specific mmc0 properties (bus-width, non-removable, etc.) from the SoC DTSI to the LTPP3G2 board DTS
- fix similar problems, i.e. nodes that don't belong in the DTSI
- move emmc_pins pinmux node from the SoC DTSI to the board DTS
- remove unused emac_pins and sdcard_pins from the SoC DTSI
- move memory@0 to the SoC DTSI (512MB is fixed in the SP7021 package)
Changes in v3:
- fix problems noted by Krzysztof Kozlowski
- put the Tibbo vendor prefix in correct alphabetical order
- remove bootargs from chosen
- name DTS nodes correctly
- fix problems reported by sashiko-bot
- add tibbo,ltpp3g2 compatible string to sunplus,sp7021.yaml
- rename i2c_tps to i2c
- rename system-led to led-0
- rename sg-led to led-1
- add the missing pinmux node: pins_uart3
- fix pins_i2ctps: use SPPCTL_PCTL_L_OU1|ODR, not L_OUT|ONV|ODR
- fix pins_btuart: remove SPPCTL_PCTL_L_ONV from BT UART RTS
- don't disable CONFIG_SMP, instead enable CONFIG_ARM_PSCI and add psci to sunplus-sp7021-achip.dtsi
- increase i2c-gpio,delay-us from 1 to 5
Changes in v2:
- fix issues spotted by sashiko-bot.
Andrew Gaylard (6):
dt-bindings: vendor-prefixes: Add Tibbo
dt-bindings: arm: sunplus: add Tibbo LTPP3G2 board compatible string
arm: dts: sunplus: add PWM, watchdog and MMC nodes to SP7021 DTSI
arm: sunplus: enable SMP via PSCI on SP7021
arm: dts: sunplus: add Tibbo LTPP3G2 board
configs: sp7021: fix defaults and enable existing device drivers
.../bindings/arm/sunplus,sp7021.yaml | 2 + .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 6 + arch/arm/boot/dts/sunplus/Makefile | 5 +- .../dts/sunplus/sunplus-sp7021-achip.dtsi | 9 + .../dts/sunplus/sunplus-sp7021-demo-v3.dts | 4 - .../dts/sunplus/sunplus-sp7021-ltpp3g2.dts | 193 ++++++++++++++++++ arch/arm/boot/dts/sunplus/sunplus-sp7021.dtsi | 74 +++---- arch/arm/configs/sp7021_defconfig | 32 +++ 9 files changed, 278 insertions(+), 49 deletions(-) create mode 100644 arch/arm/boot/dts/sunplus/sunplus-sp7021-ltpp3g2.dts
Signature · 1 line
2.53.0
PATCH v5 1/6 dt-bindings: vendor-prefixes: Add Tibbo
Add the vendor prefix for Tibbo Technology, the LTPP3G2 board manufacturer.
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -1728,6 +1728,8 @@ patternProperties: description: Texas Instruments "^tianma,.*": description: Tianma Micro-electronics Co., Ltd. + "^tibbo,.*": + description: Tibbo Technology Inc. "^tlm,.*": description: Trusted Logic Mobility "^tmt,.*":
Signature · 1 line
2.53.0
Re: [PATCH v5 1/6] dt-bindings: vendor-prefixes: Add Tibbo
Quoted 3 lines · Andrew Gaylard
Add the vendor prefix for Tibbo Technology, the LTPP3G2 board manufacturer.
Signed-off-by Andrew Gaylard <[email protected]>
pw-bot: not-applicable
Quoted 20 lines
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/vendor-prefixes.yaml +2
-0@@ -1728,6 +1728,8 @@ patternProperties: description: Texas Instruments "^tianma,.*": description: Tianma Micro-electronics Co., Ltd. + "^tibbo,.*": + description: Tibbo Technology Inc. "^tlm,.*": description: Trusted Logic Mobility "^tmt,.*":Signature · 1 line
2.53.0
PATCH v5 2/6 dt-bindings: arm: sunplus: add Tibbo LTPP3G2 board compatible string
In reply to Andrew GaylardAdd tibbo,ltpp3g2 to the list of compatible boards for the Sunplus SP7021 SoC binding.
--- Documentation/devicetree/bindings/arm/sunplus,sp7021.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/sunplus,sp7021.yaml +2 -0
@@ -9,6 +9,7 @@ title: Sunplus SP7021 Boards maintainers: - qinjian <[email protected]> + - Andrew Gaylard <[email protected]> description: | ARM platforms using Sunplus SP7021, an ARM Cortex A7 (4-cores) based SoC.
@@ -22,6 +23,7 @@ properties: - enum: - sunplus,sp7021-achip - sunplus,sp7021-demo-v3 + - tibbo,ltpp3g2 - const: sunplus,sp7021 additionalProperties: true
Signature · 1 line
2.53.0
Re: [PATCH v5 2/6] dt-bindings: arm: sunplus: add Tibbo LTPP3G2 board compatible string
pw-bot: not-applicable
PATCH v5 3/6 arm: dts: sunplus: add PWM, watchdog and MMC nodes to SP7021 DTSI
In reply to Andrew GaylardAdd device nodes for the peripherals that have upstream drivers:
- PWM controller
- Watchdog controller
- eMMC controller
Add a label to the gpio-leds node so board DTS files can override it.
Move the memory node from the DTS into the DTSI; this chip has the RAM integrated and it's not possible to add external RAM.
Remove three board-specific pinmux nodes that do not belong in the DTSI:
- emmc_pins: eMMC pinmux, moved to the LTPP3G2 board DTS.
- sdcard_pins: SD card pinmux; the SD driver is not yet implemented.
- emac_pins: Ethernet pinmux, will be defined in board DTS files that enable ethernet.
--- .../dts/sunplus/sunplus-sp7021-demo-v3.dts | 4 - arch/arm/boot/dts/sunplus/sunplus-sp7021.dtsi | 74 ++++++++----------- 2 files changed, 32 insertions(+), 46 deletions(-)
arch/arm/boot/dts/sunplus/sunplus-sp7021-demo-v3.dts +0 -4
@@ -23,8 +23,4 @@ chosen { stdout-path = "serial0:115200n8"; }; - memory@0 { - device_type = "memory"; - reg = <0x00000000 0x20000000>; - }; };
arch/arm/boot/dts/sunplus/sunplus-sp7021.dtsi +32 -42
101 lines not on this page · raw message
Signature · 1 line
2.53.0
PATCH v5 4/6 arm: sunplus: enable SMP via PSCI on SP7021
In reply to Andrew GaylardThe SP7021 firmware implements PSCI 0.2 via SMC. Add the psci node and enable-method = "psci" on each CPU node to allow the kernel to bring up all four Cortex-A7 cores.
Verified by boot log: "psci: SMC Calling Convention v1.0" and "smp: Brought up 1 node, 4 CPUs".
--- arch/arm/boot/dts/sunplus/sunplus-sp7021-achip.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/sunplus/sunplus-sp7021-achip.dtsi +9 -0
@@ -24,27 +24,36 @@ cpu0: cpu@0 { device_type = "cpu"; reg = <0>; clock-frequency = <931000000>; + enable-method = "psci"; }; cpu1: cpu@1 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; clock-frequency = <931000000>; + enable-method = "psci"; }; cpu2: cpu@2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; clock-frequency = <931000000>; + enable-method = "psci"; }; cpu3: cpu@3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; clock-frequency = <931000000>; + enable-method = "psci"; }; }; + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + gic: interrupt-controller@9f101000 { compatible = "arm,cortex-a7-gic"; interrupt-controller;
Signature · 1 line
2.53.0
PATCH v5 5/6 arm: dts: sunplus: add Tibbo LTPP3G2 board
In reply to Andrew GaylardAdd a DTS for the Tibbo LTPP3G2 board, which uses the Sunplus SP7021 SoC. The initial DTS was provided by Sunplus Technology Co. and has been adapted for upstream with permission.
The board features eMMC, SPI, a bit-banged I2C EEPROM (Atmel 24C16), PWM output to a buzzer, a watchdog, RTC, and two GPIO LEDs (heartbeat and MMC activity).
--- MAINTAINERS | 6 + arch/arm/boot/dts/sunplus/Makefile | 5 +- .../dts/sunplus/sunplus-sp7021-ltpp3g2.dts | 193 ++++++++++++++++++ 3 files changed, 201 insertions(+), 3 deletions(-) create mode 100644 arch/arm/boot/dts/sunplus/sunplus-sp7021-ltpp3g2.dts
MAINTAINERS +6 -0
@@ -3737,6 +3737,12 @@ F: drivers/reset/reset-sunplus.c F: include/dt-bindings/clock/sunplus,sp7021-clkc.h F: include/dt-bindings/reset/sunplus,sp7021-reset.h +ARM/TIBBO LTPP3G2 BOARD +M: Andrew Gaylard <[email protected]> +L: [email protected] +S: Maintained +F: arch/arm/boot/dts/sunplus/sunplus-sp7021-ltpp3g2.dts + ARM/Synaptics SoC support M: Jisheng Zhang <[email protected]> M: Sebastian Hesselbarth <[email protected]>
arch/arm/boot/dts/sunplus/Makefile +2 -3
@@ -1,5 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_SOC_SP7021) += \ - sunplus-sp7021-demo-v3.dtb -dtb-$(CONFIG_SOC_SP7021) += \ - sunplus-sp7021-demo-v3.dtb + sunplus-sp7021-demo-v3.dtb \ + sunplus-sp7021-ltpp3g2.dtb
arch/arm/boot/dts/sunplus/sunplus-sp7021-ltpp3g2.dts new file +193 -0
193 lines not on this page · raw message
Signature · 1 line
2.53.0
PATCH v5 6/6 configs: sp7021: fix defaults and enable existing device drivers
In reply to Andrew GaylardThe LTPP3G2 is based on a SP7021 and has a Cortex-A7 CPU, Ethernet, eMMC, SPI, EEPROM via I2C via GPIO, watchdog, RTC, NVMEM, and LEDs.
Apply these settings:
- ARM_ERRATA_814220=y # needed for Cortex-A7
- ARM_PSCI=y # needed to boot SMP
- CGROUPS=y
CGROUP_SCHED=y
MEMCG=y
NET=y
UNIX=y
INET=y
NETDEVICES=y
SECURITY=y
SECURITY_NETWORK=y # needed to boot the shipped rootfs
Enable these drivers:
- SP7021_EMAC
- SPI_SUNPLUS_SP7021
- I2C_GPIO
- EEPROM_AT24
- MMC_SUNPLUS
- SUNPLUS_WATCHDOG
- RTC_DRV_SUNPLUS
- NVMEM_SUNPLUS_OCOTP
- LEDS_GPIO
--- arch/arm/configs/sp7021_defconfig | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
arch/arm/configs/sp7021_defconfig +32 -0
@@ -1,4 +1,7 @@ CONFIG_SYSVIPC=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_SCHED=y +CONFIG_MEMCG=y CONFIG_NO_HZ_IDLE=y CONFIG_HIGH_RES_TIMERS=y CONFIG_PREEMPT=y
@@ -16,6 +19,8 @@ CONFIG_PERF_EVENTS=y CONFIG_ARCH_SUNPLUS=y # CONFIG_VDSO is not set CONFIG_SMP=y +CONFIG_ARM_PSCI=y +CONFIG_ARM_ERRATA_814220=y CONFIG_THUMB2_KERNEL=y CONFIG_ARCH_FORCE_MAX_ORDER=11 CONFIG_VFP=y
@@ -24,11 +29,16 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_NET=y +CONFIG_UNIX=y +CONFIG_INET=y CONFIG_UEVENT_HELPER=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_BLK_DEV_LOOP=y +CONFIG_NETDEVICES=y +CONFIG_SP7021_EMAC=y CONFIG_INPUT_SPARSEKMAP=y CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_KEYBOARD is not set
@@ -36,6 +46,26 @@ CONFIG_INPUT_EVDEV=y # CONFIG_LEGACY_PTYS is not set # CONFIG_HW_RANDOM is not set # CONFIG_HWMON is not set +CONFIG_SPI=y +CONFIG_SPI_SUNPLUS_SP7021=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_GPIO=y +CONFIG_EEPROM_AT24=y +CONFIG_MMC=y +CONFIG_MMC_SUNPLUS=y +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_SYSFS=y +CONFIG_SUNPLUS_WATCHDOG=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_SUNPLUS=y +CONFIG_NVMEM=y +CONFIG_NVMEM_SUNPLUS_OCOTP=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_RESET_CONTROLLER=y CONFIG_EXT4_FS=y
@@ -51,6 +81,8 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y CONFIG_PRINTK_TIME=y CONFIG_DYNAMIC_DEBUG=y CONFIG_MAGIC_SYSRQ=y
Signature · 1 line
2.53.0
Quoted 5 lines · Andrew Gaylard
The Tibbo LTPP3G2 is a board based on the Sunplus SP7021 SoC:
https://tibbo.com/store/tps/ltpp3g2.html
It is the platform that underpins Tibbo's industrial IoT products.This series adds board support to linux-next:
Hi all,
Ping?
v5 was posted on 24 September. Patches 1 and 2 are DT binding changes and have been ack'd (thanks Conor). I haven't heard anything from the SP7021 maintainer; mails to [email protected] bounce.
The SP7021 platform entry in MAINTAINERS has no git tree, so I am not sure how this series should be routed. Could the SoC maintainers advise whether they can take it directly, or who should pick it up?
It still applies cleanly to v7.4-rc1.
Thanks,
Andrew