* [meta-rockchip][PATCH 0/3] kmeta BSP for nanopi-m4
@ 2021-03-30 17:33 Yann Dirson
2021-03-30 17:33 ` [meta-rockchip][PATCH 1/3] linux-yocto: reduce bbappend duplication Yann Dirson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yann Dirson @ 2021-03-30 17:33 UTC (permalink / raw)
To: yocto; +Cc: twoerner, Yann Dirson
From: Yann Dirson <yann@blade-group.com>
This is a first draft of a kmeta BSP for nanopi-m4, with rough
granularity for now. For testing and comments. See patch 3 to
play with "linux-yocto-tiny" config.
Yann Dirson (3):
linux-yocto: reduce bbappend duplication
NanoPi-M4: let all variants use the same KMACHINE type
WIP linux-yocto: add a NanoPi-M4 BSP
conf/machine/include/nanopi-m4.inc | 1 +
...yocto_%.bbappend => linux-yocto%.bbappend} | 6 +++
recipes-kernel/linux/linux-yocto-dev.bbappend | 10 ----
.../linux/linux-yocto-rt_%.bbappend | 10 ----
.../linux/linux-yocto-tiny_%.bbappend | 10 ----
.../linux-yocto/bsp/nanopi-m4-standard.scc | 7 +++
.../linux/linux-yocto/bsp/nanopi-m4-tiny.scc | 7 +++
.../linux/linux-yocto/bsp/nanopi-m4.cfg | 40 +++++++++++++++
.../linux/linux-yocto/bsp/nanopi-m4.scc | 5 ++
.../linux/linux-yocto/bsp/rk3399.cfg | 48 ++++++++++++++++++
.../linux/linux-yocto/bsp/rk3399.scc | 5 ++
.../linux/linux-yocto/bsp/rockchip.cfg | 50 +++++++++++++++++++
.../linux/linux-yocto/bsp/rockchip.scc | 6 +++
13 files changed, 175 insertions(+), 30 deletions(-)
rename recipes-kernel/linux/{linux-yocto_%.bbappend => linux-yocto%.bbappend} (80%)
delete mode 100644 recipes-kernel/linux/linux-yocto-dev.bbappend
delete mode 100644 recipes-kernel/linux/linux-yocto-rt_%.bbappend
delete mode 100644 recipes-kernel/linux/linux-yocto-tiny_%.bbappend
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-standard.scc
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-tiny.scc
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.cfg
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.scc
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/rk3399.cfg
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/rk3399.scc
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/rockchip.cfg
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/rockchip.scc
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [meta-rockchip][PATCH 1/3] linux-yocto: reduce bbappend duplication
2021-03-30 17:33 [meta-rockchip][PATCH 0/3] kmeta BSP for nanopi-m4 Yann Dirson
@ 2021-03-30 17:33 ` Yann Dirson
2021-03-30 17:34 ` [meta-rockchip][PATCH 2/3] NanoPi-M4: let all variants use the same KMACHINE type Yann Dirson
2021-03-30 17:34 ` [meta-rockchip][PATCH 3/3] WIP linux-yocto: add a NanoPi-M4 BSP Yann Dirson
2 siblings, 0 replies; 4+ messages in thread
From: Yann Dirson @ 2021-03-30 17:33 UTC (permalink / raw)
To: yocto; +Cc: twoerner, Yann Dirson
From: Yann Dirson <yann@blade-group.com>
---
...{linux-yocto-dev.bbappend => linux-yocto%.bbappend} | 0
recipes-kernel/linux/linux-yocto-rt_%.bbappend | 10 ----------
recipes-kernel/linux/linux-yocto-tiny_%.bbappend | 10 ----------
recipes-kernel/linux/linux-yocto_%.bbappend | 10 ----------
4 files changed, 30 deletions(-)
rename recipes-kernel/linux/{linux-yocto-dev.bbappend => linux-yocto%.bbappend} (100%)
delete mode 100644 recipes-kernel/linux/linux-yocto-rt_%.bbappend
delete mode 100644 recipes-kernel/linux/linux-yocto-tiny_%.bbappend
delete mode 100644 recipes-kernel/linux/linux-yocto_%.bbappend
diff --git a/recipes-kernel/linux/linux-yocto-dev.bbappend b/recipes-kernel/linux/linux-yocto%.bbappend
similarity index 100%
rename from recipes-kernel/linux/linux-yocto-dev.bbappend
rename to recipes-kernel/linux/linux-yocto%.bbappend
diff --git a/recipes-kernel/linux/linux-yocto-rt_%.bbappend b/recipes-kernel/linux/linux-yocto-rt_%.bbappend
deleted file mode 100644
index 7702e3f..0000000
--- a/recipes-kernel/linux/linux-yocto-rt_%.bbappend
+++ /dev/null
@@ -1,10 +0,0 @@
-COMPATIBLE_MACHINE_marsboard-rk3066 = "marsboard-rk3066"
-COMPATIBLE_MACHINE_rock2-square = "rock2-square"
-COMPATIBLE_MACHINE_radxarock = "radxarock"
-COMPATIBLE_MACHINE_firefly-rk3288 = "firefly-rk3288"
-COMPATIBLE_MACHINE_vyasa-rk3288 = "vyasa-rk3288"
-COMPATIBLE_MACHINE_tinker-board = "tinker-board"
-COMPATIBLE_MACHINE_tinker-board-s = "tinker-board-s"
-COMPATIBLE_MACHINE_rock-pi-4 = "rock-pi-4"
-COMPATIBLE_MACHINE_nanopi-m4 = "nanopi-m4"
-COMPATIBLE_MACHINE_nanopi-m4-2gb = "nanopi-m4-2gb"
diff --git a/recipes-kernel/linux/linux-yocto-tiny_%.bbappend b/recipes-kernel/linux/linux-yocto-tiny_%.bbappend
deleted file mode 100644
index 7702e3f..0000000
--- a/recipes-kernel/linux/linux-yocto-tiny_%.bbappend
+++ /dev/null
@@ -1,10 +0,0 @@
-COMPATIBLE_MACHINE_marsboard-rk3066 = "marsboard-rk3066"
-COMPATIBLE_MACHINE_rock2-square = "rock2-square"
-COMPATIBLE_MACHINE_radxarock = "radxarock"
-COMPATIBLE_MACHINE_firefly-rk3288 = "firefly-rk3288"
-COMPATIBLE_MACHINE_vyasa-rk3288 = "vyasa-rk3288"
-COMPATIBLE_MACHINE_tinker-board = "tinker-board"
-COMPATIBLE_MACHINE_tinker-board-s = "tinker-board-s"
-COMPATIBLE_MACHINE_rock-pi-4 = "rock-pi-4"
-COMPATIBLE_MACHINE_nanopi-m4 = "nanopi-m4"
-COMPATIBLE_MACHINE_nanopi-m4-2gb = "nanopi-m4-2gb"
diff --git a/recipes-kernel/linux/linux-yocto_%.bbappend b/recipes-kernel/linux/linux-yocto_%.bbappend
deleted file mode 100644
index 7702e3f..0000000
--- a/recipes-kernel/linux/linux-yocto_%.bbappend
+++ /dev/null
@@ -1,10 +0,0 @@
-COMPATIBLE_MACHINE_marsboard-rk3066 = "marsboard-rk3066"
-COMPATIBLE_MACHINE_rock2-square = "rock2-square"
-COMPATIBLE_MACHINE_radxarock = "radxarock"
-COMPATIBLE_MACHINE_firefly-rk3288 = "firefly-rk3288"
-COMPATIBLE_MACHINE_vyasa-rk3288 = "vyasa-rk3288"
-COMPATIBLE_MACHINE_tinker-board = "tinker-board"
-COMPATIBLE_MACHINE_tinker-board-s = "tinker-board-s"
-COMPATIBLE_MACHINE_rock-pi-4 = "rock-pi-4"
-COMPATIBLE_MACHINE_nanopi-m4 = "nanopi-m4"
-COMPATIBLE_MACHINE_nanopi-m4-2gb = "nanopi-m4-2gb"
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-rockchip][PATCH 2/3] NanoPi-M4: let all variants use the same KMACHINE type
2021-03-30 17:33 [meta-rockchip][PATCH 0/3] kmeta BSP for nanopi-m4 Yann Dirson
2021-03-30 17:33 ` [meta-rockchip][PATCH 1/3] linux-yocto: reduce bbappend duplication Yann Dirson
@ 2021-03-30 17:34 ` Yann Dirson
2021-03-30 17:34 ` [meta-rockchip][PATCH 3/3] WIP linux-yocto: add a NanoPi-M4 BSP Yann Dirson
2 siblings, 0 replies; 4+ messages in thread
From: Yann Dirson @ 2021-03-30 17:34 UTC (permalink / raw)
To: yocto; +Cc: twoerner, Yann Dirson
From: Yann Dirson <yann@blade-group.com>
---
conf/machine/include/nanopi-m4.inc | 1 +
1 file changed, 1 insertion(+)
diff --git a/conf/machine/include/nanopi-m4.inc b/conf/machine/include/nanopi-m4.inc
index 74cdae8..603160f 100644
--- a/conf/machine/include/nanopi-m4.inc
+++ b/conf/machine/include/nanopi-m4.inc
@@ -3,6 +3,7 @@
require rk3399.inc
+KMACHINE = "nanopi-m4"
KERNEL_DEVICETREE = "rockchip/rk3399-nanopi-m4.dtb"
RK_BOOT_DEVICE = "mmcblk1"
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-rockchip][PATCH 3/3] WIP linux-yocto: add a NanoPi-M4 BSP
2021-03-30 17:33 [meta-rockchip][PATCH 0/3] kmeta BSP for nanopi-m4 Yann Dirson
2021-03-30 17:33 ` [meta-rockchip][PATCH 1/3] linux-yocto: reduce bbappend duplication Yann Dirson
2021-03-30 17:34 ` [meta-rockchip][PATCH 2/3] NanoPi-M4: let all variants use the same KMACHINE type Yann Dirson
@ 2021-03-30 17:34 ` Yann Dirson
2 siblings, 0 replies; 4+ messages in thread
From: Yann Dirson @ 2021-03-30 17:34 UTC (permalink / raw)
To: yocto; +Cc: twoerner, Yann Dirson
From: Yann Dirson <yann@blade-group.com>
This patch provides "standard" and "tiny" BSP.
There is still much work to be done in dispatching feature to individual
scc files - the more boards we can support the better it will get.
It's sad that when a different kernel type is selected, and no BSP is
available, this gets silently DWIM-handled - much time gets lost hunting
for the reason.
Tiny is not really testable by itself, I played with it using:
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
KERNEL_FEATURES_append = "\
ktypes/base/base.scc \
features/debug/printk.scc \
cfg/fs/ext4.scc \
"
Regardless from those additions, quite a number of useless hardware features
still manage to creep aboard. Despite this, the fitImage weight drops from
11MB with "standard" to 5MB with "tiny" and boots to serial shell.
---
recipes-kernel/linux/linux-yocto%.bbappend | 6 +++
.../linux-yocto/bsp/nanopi-m4-standard.scc | 7 +++
.../linux/linux-yocto/bsp/nanopi-m4-tiny.scc | 7 +++
.../linux/linux-yocto/bsp/nanopi-m4.cfg | 40 +++++++++++++++
.../linux/linux-yocto/bsp/nanopi-m4.scc | 5 ++
.../linux/linux-yocto/bsp/rk3399.cfg | 48 ++++++++++++++++++
.../linux/linux-yocto/bsp/rk3399.scc | 5 ++
.../linux/linux-yocto/bsp/rockchip.cfg | 50 +++++++++++++++++++
.../linux/linux-yocto/bsp/rockchip.scc | 6 +++
9 files changed, 174 insertions(+)
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-standard.scc
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-tiny.scc
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.cfg
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.scc
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/rk3399.cfg
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/rk3399.scc
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/rockchip.cfg
create mode 100644 recipes-kernel/linux/linux-yocto/bsp/rockchip.scc
diff --git a/recipes-kernel/linux/linux-yocto%.bbappend b/recipes-kernel/linux/linux-yocto%.bbappend
index 7702e3f..5193373 100644
--- a/recipes-kernel/linux/linux-yocto%.bbappend
+++ b/recipes-kernel/linux/linux-yocto%.bbappend
@@ -1,3 +1,9 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
+
+SRC_URI_append = "\
+ file://bsp;type=kmeta;subdir=kernel-meta \
+"
+
COMPATIBLE_MACHINE_marsboard-rk3066 = "marsboard-rk3066"
COMPATIBLE_MACHINE_rock2-square = "rock2-square"
COMPATIBLE_MACHINE_radxarock = "radxarock"
diff --git a/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-standard.scc b/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-standard.scc
new file mode 100644
index 0000000..5c74d6b
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-standard.scc
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: MIT
+define KMACHINE nanopi-m4
+define KTYPE standard
+define KARCH arm
+
+include ktypes/standard/standard.scc
+include nanopi-m4.scc
diff --git a/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-tiny.scc b/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-tiny.scc
new file mode 100644
index 0000000..6e94d6a
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4-tiny.scc
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: MIT
+define KMACHINE nanopi-m4
+define KTYPE tiny
+define KARCH arm
+
+include ktypes/tiny/tiny.scc
+include nanopi-m4.scc
diff --git a/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.cfg b/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.cfg
new file mode 100644
index 0000000..5864008
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.cfg
@@ -0,0 +1,40 @@
+CONFIG_MFD_RK808=y
+CONFIG_COMMON_CLK_RK808=y
+
+# regulators
+CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_FAN53555=y
+
+CONFIG_MMC_BLOCK=y
+
+# audio jack
+CONFIG_SND_SOC_ROCKCHIP_RT5651=m
+
+# BT, maybe some - RFCOMM for headset voice, MSFTEXT ?
+CONFIG_BT=m
+#CONFIG_BT_BCM=m
+#CONFIG_BT_HCIUART_BCM=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_HS=y
+CONFIG_BT_LE=y
+CONFIG_BT_MSFTEXT=y
+CONFIG_BT_DEBUGFS=y
+CONFIG_WIRELESS=y
+CONFIG_RFKILL=m
+
+CONFIG_PHY_ROCKCHIP_DP=y
+
+CONFIG_VIDEO_DEV=m
+CONFIG_V4L_MEM2MEM_DRIVERS=y
+CONFIG_VIDEO_ROCKCHIP_RGA=m
+
+CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
+CONFIG_SND_SOC_RK3288_HDMI_ANALOG=m
+
+CONFIG_V4L2_H264=m
+CONFIG_MEDIA_CONTROLLER_REQUEST_API=y
+CONFIG_VIDEO_HANTRO=m
+CONFIG_VIDEO_HANTRO_ROCKCHIP=y
+CONFIG_VIDEO_ROCKCHIP_VDEC=m
diff --git a/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.scc b/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.scc
new file mode 100644
index 0000000..f4267aa
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/bsp/nanopi-m4.scc
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: MIT
+
+kconf hardware nanopi-m4.cfg
+
+include rk3399.scc
diff --git a/recipes-kernel/linux/linux-yocto/bsp/rk3399.cfg b/recipes-kernel/linux/linux-yocto/bsp/rk3399.cfg
new file mode 100644
index 0000000..232d2cf
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/bsp/rk3399.cfg
@@ -0,0 +1,48 @@
+# A72 errata, all past revisions
+CONFIG_ARM64_ERRATUM_1319367=y
+# A53 errata, all patched on boot when needed
+CONFIG_ARM64_ERRATUM_826319=y
+CONFIG_ARM64_ERRATUM_827319=y
+CONFIG_ARM64_ERRATUM_824069=y
+CONFIG_ARM64_ERRATUM_819472=y
+
+# cru
+CONFIG_CLK_RK3399=y
+
+CONFIG_PL330_DMA=y
+CONFIG_I2C_RK3X=y
+CONFIG_SERIAL_8250_DW=y
+
+# usb
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_TYPEC=y
+
+# ethernet
+CONFIG_NET_VENDOR_STMICRO=y
+CONFIG_STMMAC_ETH=m
+CONFIG_STMMAC_PLATFORM=m
+CONFIG_DWMAC_ROCKCHIP=m
+CONFIG_ROCKCHIP_PHY=m
+
+# display
+CONFIG_ROCKCHIP_DW_HDMI=y
+CONFIG_ROCKCHIP_DW_MIPI_DSI=y
+CONFIG_ROCKCHIP_ANALOGIX_DP=y
+CONFIG_ROCKCHIP_CDN_DP=y
+CONFIG_DRM_DW_HDMI=m
+CONFIG_DRM_DW_HDMI_I2S_AUDIO=m
+CONFIG_DRM_DW_HDMI_CEC=m
+CONFIG_DRM_DW_MIPI_DSI=m
+CONFIG_DRM_PANFROST=m
+
+# usb
+CONFIG_USB_DWC2=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_DUAL_ROLE=y
+
+# sd/mmc
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
diff --git a/recipes-kernel/linux/linux-yocto/bsp/rk3399.scc b/recipes-kernel/linux/linux-yocto/bsp/rk3399.scc
new file mode 100644
index 0000000..9b1a88e
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/bsp/rk3399.scc
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: MIT
+
+kconf hardware rk3399.cfg
+
+include rockchip.scc
diff --git a/recipes-kernel/linux/linux-yocto/bsp/rockchip.cfg b/recipes-kernel/linux/linux-yocto/bsp/rockchip.cfg
new file mode 100644
index 0000000..eac2a31
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/bsp/rockchip.cfg
@@ -0,0 +1,50 @@
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_COMMON_CLK_ROCKCHIP=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_PWM=y
+CONFIG_I2C=y
+CONFIG_FW_LOADER=y
+CONFIG_PHY_ROCKCHIP_EMMC=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_ROCKCHIP=y
+CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_ROCKCHIP_PM_DOMAINS=y
+
+CONFIG_PWM=y
+CONFIG_PWM_ROCKCHIP=y
+
+CONFIG_DRM_KMS_HELPER=m
+CONFIG_DRM_FBDEV_EMULATION=y
+CONFIG_ROCKCHIP_IOMMU=y
+CONFIG_DRM_ROCKCHIP=m
+CONFIG_DRM_BRIDGE=y
+
+CONFIG_SND=y
+CONFIG_SND_SOC=y
+CONFIG_SND_HDA_CODEC_HDMI=m
+CONFIG_SND_SOC_ROCKCHIP=m
+CONFIG_SND_SOC_ROCKCHIP_I2S=m
+CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
+
+CONFIG_NVMEM=y
+CONFIG_ROCKCHIP_EFUSE=m
+
+CONFIG_CPU_FREQ=y
+
+# maybe?
+CONFIG_MFD_SYSCON=y
+CONFIG_FB_MODE_HELPERS=y
+
+# possibly for somewhere else
+CONFIG_DRM=m
+CONFIG_DRM_MIPI_DSI=y
+CONFIG_SOUND=y
+CONFIG_USB=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+
+# obviously for somewhere else
+CONFIG_MULTIUSER=y
+CONFIG_TTY=y
+CONFIG_SERIAL_EARLYCON=y
diff --git a/recipes-kernel/linux/linux-yocto/bsp/rockchip.scc b/recipes-kernel/linux/linux-yocto/bsp/rockchip.scc
new file mode 100644
index 0000000..800f105
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/bsp/rockchip.scc
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: MIT
+
+kconf hardware rockchip.cfg
+
+include cfg/dmaengine.scc
+include features/mmc/mmc-block.cfg
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-30 17:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 17:33 [meta-rockchip][PATCH 0/3] kmeta BSP for nanopi-m4 Yann Dirson
2021-03-30 17:33 ` [meta-rockchip][PATCH 1/3] linux-yocto: reduce bbappend duplication Yann Dirson
2021-03-30 17:34 ` [meta-rockchip][PATCH 2/3] NanoPi-M4: let all variants use the same KMACHINE type Yann Dirson
2021-03-30 17:34 ` [meta-rockchip][PATCH 3/3] WIP linux-yocto: add a NanoPi-M4 BSP Yann Dirson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.