diff options
Diffstat (limited to 'bsp/meta-sancloud')
43 files changed, 1216 insertions, 101 deletions
diff --git a/bsp/meta-sancloud/.gitignore b/bsp/meta-sancloud/.gitignore new file mode 100644 index 00000000..397b289b --- /dev/null +++ b/bsp/meta-sancloud/.gitignore @@ -0,0 +1,2 @@ +/build +/layers diff --git a/bsp/meta-sancloud/.gitlab-ci.yml b/bsp/meta-sancloud/.gitlab-ci.yml new file mode 100644 index 00000000..99f53b28 --- /dev/null +++ b/bsp/meta-sancloud/.gitlab-ci.yml @@ -0,0 +1,49 @@ +stages: + - build + +.build: + stage: build + image: crops/poky + before_script: + - export PATH=~/.local/bin:$PATH + - wget https://bootstrap.pypa.io/get-pip.py + - python3 get-pip.py + - python3 -m pip install kas + - wget -q 'https://downloads.rclone.org/rclone-current-linux-amd64.zip' + - unzip -q rclone-current-linux-amd64.zip + - mv rclone-*-linux-amd64/rclone ~/.local/bin/ + - rm -rf rclone-*-linux-amd64* + after_script: + - rm -rf build + artifacts: + name: images + expose_as: images + expire_in: 3 days + paths: + - images + cache: + paths: + - layers + +bbe-poky: + extends: .build + script: + - ./scripts/ci-build.sh $CI_JOB_NAME core-image-base + - | + if [[ -n "$B2_KEY_ID" ]]; then + rclone config create b2 b2 account $B2_KEY_ID key $B2_APP_KEY > /dev/null + rclone copy --ignore-existing build/sstate-cache/ b2:sc-yocto/poky/sstate/ + rclone copy --ignore-existing build/tmp/deploy/sources/mirror/ b2:sc-yocto/mirror/ + fi + +bbe-arago: + extends: .build + image: registry.gitlab.com/sancloudltd/buildimg/gcc-arm-9.2:latest + script: + - ./scripts/ci-build.sh $CI_JOB_NAME tisdk-base-image tisdk-default-image + - | + if [[ -n "$B2_KEY_ID" ]]; then + rclone config create b2 b2 account $B2_KEY_ID key $B2_APP_KEY > /dev/null + rclone copy --ignore-existing build/sstate-cache/ b2:sc-yocto/arago/sstate/ + rclone copy --ignore-existing build/tmp/deploy/sources/mirror/ b2:sc-yocto/mirror/ + fi diff --git a/bsp/meta-sancloud/COPYING b/bsp/meta-sancloud/COPYING index d4bf6d69..4459f844 100644 --- a/bsp/meta-sancloud/COPYING +++ b/bsp/meta-sancloud/COPYING @@ -1,4 +1,4 @@ -Copyright (C) 2018-2019, Sancloud Ltd +Copyright (C) 2018-2020, Sancloud Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/bsp/meta-sancloud/ChangeLog.md b/bsp/meta-sancloud/ChangeLog.md new file mode 100644 index 00000000..3c7b3cc9 --- /dev/null +++ b/bsp/meta-sancloud/ChangeLog.md @@ -0,0 +1,14 @@ +# ChangeLog for meta-sancloud + +## dunfell-r1 (2020-07-07) + +Initial release for the Yocto Project 3.1 "dunfell" release series. + +Component versions: + +* Linux v5.4.40-sc1 & v5.4.43-rt25-sc1 + * Including patches from TI 07.00.00.005 & 07.00.00.005-rt releases +* poky 3.1.1 +* meta-ti & meta-arago 07.00.00 +* Corresponding versions of meta-openembedded, meta-arm, meta-rtlwifi and + meta-qt5 diff --git a/bsp/meta-sancloud/README.md b/bsp/meta-sancloud/README.md index 4356460f..c0c080b0 100644 --- a/bsp/meta-sancloud/README.md +++ b/bsp/meta-sancloud/README.md @@ -1,14 +1,14 @@ -[<img align=right src="https://www.sancloud.co.uk/wp-content/uploads/2016/09/sancloud_and_address_web.png">](https://www.sancloud.co.uk/) - Yocto BSP layer for the SanCloud boards ======================================= Quick links ----------- +[<img align=right src="https://www.sancloud.co.uk/wp-content/uploads/2016/09/sancloud_and_address_web.png">](https://www.sancloud.co.uk/) + * [SanCloud website](https://www.sancloud.co.uk/) -* [BeagleBone Enhanced Description](https://www.sancloud.co.uk/?page_id=254) +* [BeagleBone Enhanced Description](https://www.sancloud.co.uk/beaglebone-enhanced-bbe) * [Sancloud repositories on GitHub](https://github.com/SanCloudLtd) @@ -21,19 +21,42 @@ Currently supported hardware with corresponding Yocto Project MACHINE names: * `bbe`: Sancloud BeagleBone Enhanced (BBE) -This BSP is layer is tested in two primary configurations: +This BSP is layer supports the following configurations: * Automotive Grade Linux (AGL) * Arago Distribution - -Additionally, this BSP layer should work with the distro-less configuration -included in openembedded-core as well as the Poky distribution. +* Poky Reference Distribution + +Getting started with Poky +------------------------- + +This BSP layer is listed in the +[OpenEmbedded Layer Index](http://layers.openembedded.org/) +which makes getting started very easy. Once your OpenEmbedded/Yocto Project +build environment is set up you can use the `bitbake-layers layerindex-fetch` +command to download this layer with all its dependencies and add these layers +to your bblayers.conf file automatically. + +If you do not have a Yocto Project build environment set up please first +follow the +[Yocto Project Quick Build Guide](https://www.yoctoproject.org/docs/3.1.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html) +to ensure that your Linux system has the correct packages installed and that +a simple build succeeds. Once you know that your Linux system is set up +correctly you can download the appropriate Yocto Project version and build an +image for the BBE using the following commands: + + git clone -b dunfell git://git.yoctoproject.org/poky + cd poky + source oe-init-build-env + bitbake-layers layerindex-fetch meta-sancloud + echo 'MACHINE = "bbe"' >> conf/local.conf + bitbake core-image-base Getting Started with AGL ------------------------ -This BSP layer is included in the most recent stable branch of AGL, code-named -Grumpy Guppy. AGL sources can be downloaded by following the +This BSP layer is included in recent releases of AGL. AGL sources can be +downloaded by following the [upstream instructions](https://wiki.automotivelinux.org/agl-distro/source-code). Once the AGL sources have been downloaded and you're in the top-level AGL directory, run the following commands to build the AGL Demo image for the @@ -42,12 +65,47 @@ Sancloud BBE: source meta-agl/scripts/aglsetup.sh -m bbe agl-demo agl-devel bitbake agl-demo-platform -Getting started with Arago --------------------------- +Getting started with Arago/Poky using kas +----------------------------------------- + +This BSP layer includes build configuration files for use with the +[kas build tool](https://github.com/siemens/kas). This tool can fetch all +layer dependencies (including bitbake) and set up a build directory with +appropriate configuration for the BBE and the chosen distro. It can be +installed by running `pip install kas` as long as you have a recent Python +version. + +### Poky + +To use kas to build the Poky distro for the BBE, run the following command in +the top directory of this repository: + + kas build kas/bbe-poky.yml + +### Arago + +To build the Arago distro for the BBE the appropriate ARM toolchain first +needs to be installed. This typically requires commands to be ran as root or +via sudo. For the dunfell branch, download +[gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz](https://bit.ly/arm-none-linux-gnueabihf-2019-12) +and unpack into /opt. This can be done at the command line using the +following commands: + + wget 'https://bit.ly/arm-none-linux-gnueabihf-2019-12' -O gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz + sudo tar xf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -C /opt + +Once the toolchain is installed in the correct location, run the following +command in the top level of this repository: + + kas build kas/bbe-arago.yml + +### Customisation -A pre-integrated Arago Distribution repository is available at -https://github.com/SanCloudLtd/sancloud-arago. Please follow the instructions -in the README.md file in that repository to get started. +The build configuration files in the kas directory can be used as the basis of +further customisation and integration work. It's recommended to copy the build +configuration files into your own repository (adding a `url:` entry for the +meta-sancloud layer) and work there so that your changes can be tracked +separately from future BSP updates in this repository. Support ------- diff --git a/bsp/meta-sancloud/conf/include/sancloud-enable-archiver.inc b/bsp/meta-sancloud/conf/include/sancloud-enable-archiver.inc new file mode 100644 index 00000000..b608d15f --- /dev/null +++ b/bsp/meta-sancloud/conf/include/sancloud-enable-archiver.inc @@ -0,0 +1,8 @@ +INHERIT += "archiver" +BB_GENERATE_MIRROR_TARBALLS = "1" +BB_GENERATE_SHALLOW_TARBALLS = "1" +BB_GIT_SHALLOW = "1" +ARCHIVER_MODE[src] = "mirror" +ARCHIVER_MODE[mirror] = "combined" +ARCHIVER_MIRROR_EXCLUDE = "file://" +COPYLEFT_LICENSE_INCLUDE = "*" diff --git a/bsp/meta-sancloud/conf/include/sancloud-mirrors.inc b/bsp/meta-sancloud/conf/include/sancloud-mirrors.inc new file mode 100644 index 00000000..4c08462c --- /dev/null +++ b/bsp/meta-sancloud/conf/include/sancloud-mirrors.inc @@ -0,0 +1,14 @@ +PREMIRRORS ??= "\ +bzr://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +cvs://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +git://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +gitsm://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +hg://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +osc://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +p4://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +svn://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n" + +MIRRORS =+ "\ +ftp://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +http://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +https://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n" diff --git a/bsp/meta-sancloud/conf/include/sancloud-sstate-arago.inc b/bsp/meta-sancloud/conf/include/sancloud-sstate-arago.inc new file mode 100644 index 00000000..21dcf593 --- /dev/null +++ b/bsp/meta-sancloud/conf/include/sancloud-sstate-arago.inc @@ -0,0 +1,2 @@ +SSTATE_MIRRORS =+ "\ +file://.* https://cdn.sancloud.info/file/sc-yocto/arago/sstate/PATH \n" diff --git a/bsp/meta-sancloud/conf/include/sancloud-sstate-poky.inc b/bsp/meta-sancloud/conf/include/sancloud-sstate-poky.inc new file mode 100644 index 00000000..8f2c7d26 --- /dev/null +++ b/bsp/meta-sancloud/conf/include/sancloud-sstate-poky.inc @@ -0,0 +1,2 @@ +SSTATE_MIRRORS =+ "\ +file://.* https://cdn.sancloud.info/file/sc-yocto/poky/sstate/PATH \n" diff --git a/bsp/meta-sancloud/conf/layer.conf b/bsp/meta-sancloud/conf/layer.conf index 195a6e27..118b9d8c 100644 --- a/bsp/meta-sancloud/conf/layer.conf +++ b/bsp/meta-sancloud/conf/layer.conf @@ -9,9 +9,14 @@ BBFILE_COLLECTIONS += "meta-sancloud" BBFILE_PATTERN_meta-sancloud := "^${LAYERDIR}/" BBFILE_PRIORITY_meta-sancloud = "9" -LAYERSERIES_COMPAT_meta-sancloud = "thud" +LAYERSERIES_COMPAT_meta-sancloud = "dunfell" LAYERDEPENDS_meta-sancloud = " \ core \ meta-ti \ rtlwifi \ " + +BBFILES_DYNAMIC += " \ + meta-arago-distro:${LAYERDIR}/dynamic-layers/meta-arago-distro/*/*/*.bbappend \ + meta-kernel:${LAYERDIR}/dynamic-layers/meta-kernel/*/*/*.bbappend \ + " diff --git a/bsp/meta-sancloud/conf/machine/bbe.conf b/bsp/meta-sancloud/conf/machine/bbe.conf index cc58b098..da9e1026 100644 --- a/bsp/meta-sancloud/conf/machine/bbe.conf +++ b/bsp/meta-sancloud/conf/machine/bbe.conf @@ -2,35 +2,47 @@ #@NAME: SanCloud BeagleBone Enhanced Development Board #@DESCRIPTION: Machine configuration for the BeagleBone Enhanced http://www.sancloud.co.uk/?page_id=254 Board +################################################################################ +# Basic machine config + MACHINEOVERRIDES =. "beaglebone:" + +IMAGE_FSTYPES += "wic.bmap" +WKS_FILE ?= "sancloud_bbe.wks" + require conf/machine/include/ti33x.inc +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "u-boot-script-bbe" + MACHINE_EXTRA_RDEPENDS += " \ kernel-modules linux-firmware-rtl8723 usbutils \ - iw crda rtl8723bu kernel-module-8723bu \ + iw wireless-regdb-static rtl8723bu kernel-module-8723bu \ " -ARAGO_IMAGE_EXTRA_INSTALL += "packagegroup-base" +SERIAL_CONSOLE = "115200 ttyS0" -EXTRA_IMAGEDEPENDS += "u-boot-bbe" +################################################################################ +# U-boot -IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" -WKS_FILE ?= "sancloud_bbe.wks" -do_image_wic[depends] += "u-boot-bbe:do_build" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot" -SERIAL_CONSOLE = "115200 ttyS0" +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" +UBOOT_MACHINE = "am335x_evm_config" + +EXTRA_IMAGEDEPENDS += "u-boot" -BBE_RT_KERNEL ??= "0" -PREFERRED_PROVIDER_virtual/kernel_bbe = '${@oe.utils.conditional("BBE_RT_KERNEL","1","linux-bbe-rt","linux-bbe",d)}' -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-bbe" -PREFERRED_PROVIDER_u-boot = "u-boot-bbe" +################################################################################ +# Kernel KERNEL_DEVICETREE = " \ am335x-sancloud-bbe.dtb \ - am335x-sancloud-bbei-wifi.dtb \ - am335x-sancloud-bbe-icu4.dtb \ " KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" -SPL_BINARY = "MLO" -UBOOT_SUFFIX = "img" -UBOOT_MACHINE = "am335x_evm_config" +BBE_KERNEL_PROVIDER ??= "ti" +require conf/machine/include/bbe-kernel-${BBE_KERNEL_PROVIDER}.inc + +################################################################################ +# Arago distro support + +ARAGO_IMAGE_EXTRA_INSTALL += "packagegroup-base" diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-lts.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-lts.inc new file mode 100644 index 00000000..48e624d5 --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-lts.inc @@ -0,0 +1,2 @@ +require conf/machine/include/bbe-kernel-stable.inc +PREFERRED_VERSION_linux-stable = "5.4%" diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-mainline.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-mainline.inc new file mode 100644 index 00000000..983626e9 --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-mainline.inc @@ -0,0 +1,3 @@ +PREFERRED_PROVIDER_virtual/kernel_bbe = "linux-mainline" +KERNEL_CONFIG_COMMAND = "oe_runmake -C ${S} CC="${KERNEL_CC}" LD="${KERNEL_LD}" O=${B} multi_v7_defconfig" +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-devicetree" diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-stable.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-stable.inc new file mode 100644 index 00000000..610e2ee2 --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-stable.inc @@ -0,0 +1,7 @@ +PREFERRED_PROVIDER_virtual/kernel_bbe = "linux-stable" +KERNEL_CONFIG_COMMAND = "oe_runmake -C ${S} CC="${KERNEL_CC}" LD="${KERNEL_LD}" O=${B} multi_v7_defconfig" +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-devicetree" +KERNEL_DEVICETREE += " \ + am335x-sancloud-bbei-wifi.dtb \ + am335x-sancloud-bbe-icu4.dtb \ + " diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti-rt.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti-rt.inc new file mode 100644 index 00000000..26876dd9 --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti-rt.inc @@ -0,0 +1,5 @@ +PREFERRED_PROVIDER_virtual/kernel_bbe = "linux-bbe-rt" +KERNEL_DEVICETREE += " \ + am335x-sancloud-bbei-wifi.dtb \ + am335x-sancloud-bbe-icu4.dtb \ + " diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti.inc new file mode 100644 index 00000000..49f3102a --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti.inc @@ -0,0 +1,5 @@ +PREFERRED_PROVIDER_virtual/kernel_bbe = "linux-bbe" +KERNEL_DEVICETREE += " \ + am335x-sancloud-bbei-wifi.dtb \ + am335x-sancloud-bbe-icu4.dtb \ + " diff --git a/bsp/meta-sancloud/meta-sancloud-arago/recipes-graphics/wayland/weston-conf_%.bbappend b/bsp/meta-sancloud/dynamic-layers/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend index 286060de..286060de 100644 --- a/bsp/meta-sancloud/meta-sancloud-arago/recipes-graphics/wayland/weston-conf_%.bbappend +++ b/bsp/meta-sancloud/dynamic-layers/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend diff --git a/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable/0001-arm-dts-Update-SanCloud-DTS-files.patch b/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable/0001-arm-dts-Update-SanCloud-DTS-files.patch new file mode 100644 index 00000000..af489edb --- /dev/null +++ b/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable/0001-arm-dts-Update-SanCloud-DTS-files.patch @@ -0,0 +1,609 @@ +From eee32ba116512ecb5297b5395c8a9e89dafabfe5 Mon Sep 17 00:00:00 2001 +From: Paul Barker <paul.barker@sancloud.co.uk> +Date: Sat, 23 May 2020 10:46:43 +0100 +Subject: [PATCH] arm: dts: Update SanCloud DTS files + +Signed-off-by: Paul Barker <paul.barker@sancloud.co.uk> +--- + .../boot/dts/am335x-sancloud-bbe-common.dtsi | 128 +++++++++++ + .../arm/boot/dts/am335x-sancloud-bbe-icu4.dts | 198 ++++++++++++++++++ + arch/arm/boot/dts/am335x-sancloud-bbe.dts | 124 +---------- + .../boot/dts/am335x-sancloud-bbei-wifi.dts | 109 ++++++++++ + 4 files changed, 436 insertions(+), 123 deletions(-) + create mode 100644 arch/arm/boot/dts/am335x-sancloud-bbe-common.dtsi + create mode 100644 arch/arm/boot/dts/am335x-sancloud-bbe-icu4.dts + create mode 100644 arch/arm/boot/dts/am335x-sancloud-bbei-wifi.dts + +diff --git a/arch/arm/boot/dts/am335x-sancloud-bbe-common.dtsi b/arch/arm/boot/dts/am335x-sancloud-bbe-common.dtsi +new file mode 100644 +index 000000000000..74092cfbd56c +--- /dev/null ++++ b/arch/arm/boot/dts/am335x-sancloud-bbe-common.dtsi +@@ -0,0 +1,128 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ */ ++ ++#include <dt-bindings/interrupt-controller/irq.h> ++ ++&am33xx_pinmux { ++ pinctrl-names = "default"; ++ ++ cpsw_default: cpsw_default { ++ pinctrl-single,pins = < ++ /* Slave 1 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txen.rgmii1_tctl */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ ++ >; ++ }; ++ ++ cpsw_sleep: cpsw_sleep { ++ pinctrl-single,pins = < ++ /* Slave 1 reset value */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ >; ++ }; ++ ++ davinci_mdio_default: davinci_mdio_default { ++ pinctrl-single,pins = < ++ /* MDIO */ ++ AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0) ++ AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0) ++ >; ++ }; ++ ++ davinci_mdio_sleep: davinci_mdio_sleep { ++ pinctrl-single,pins = < ++ /* MDIO reset value */ ++ AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ >; ++ }; ++ ++ usb_hub_ctrl: usb_hub_ctrl { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_OUTPUT_PULLUP, MUX_MODE7) /* rmii1_refclk.gpio0_29 */ ++ >; ++ }; ++ ++ mpu6050_pins: pinmux_mpu6050_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT, MUX_MODE7) /* uart0_ctsn.gpio1_8 */ ++ >; ++ }; ++ ++ lps3331ap_pins: pinmux_lps3331ap_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A10, PIN_INPUT, MUX_MODE7) /* gpmc_a10.gpio1_26 */ ++ >; ++ }; ++}; ++ ++&mac { ++ pinctrl-names = "default", "sleep"; ++ pinctrl-0 = <&cpsw_default>; ++ pinctrl-1 = <&cpsw_sleep>; ++ status = "okay"; ++}; ++ ++&davinci_mdio { ++ pinctrl-names = "default", "sleep"; ++ pinctrl-0 = <&davinci_mdio_default>; ++ pinctrl-1 = <&davinci_mdio_sleep>; ++ status = "okay"; ++ ++ ethphy0: ethernet-phy@0 { ++ reg = <0>; ++ }; ++}; ++ ++&cpsw_emac0 { ++ phy-handle = <ðphy0>; ++ phy-mode = "rgmii-id"; ++}; ++ ++&i2c0 { ++ lps331ap: barometer@5c { ++ compatible = "st,lps331ap-press"; ++ st,drdy-int-pin = <1>; ++ reg = <0x5c>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <26 IRQ_TYPE_EDGE_RISING>; ++ }; ++ ++ mpu6050: accelerometer@68 { ++ compatible = "invensense,mpu6050"; ++ reg = <0x68>; ++ interrupt-parent = <&gpio0>; ++ interrupts = <2 IRQ_TYPE_EDGE_RISING>; ++ orientation = <0xff 0 0 0 1 0 0 0 0xff>; ++ }; ++ ++ usb2512b: usb-hub@2c { ++ compatible = "microchip,usb2512b"; ++ reg = <0x2c>; ++ reset-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; ++ /* wifi on port 4 */ ++ }; ++}; +diff --git a/arch/arm/boot/dts/am335x-sancloud-bbe-icu4.dts b/arch/arm/boot/dts/am335x-sancloud-bbe-icu4.dts +new file mode 100644 +index 000000000000..3de12eff6567 +--- /dev/null ++++ b/arch/arm/boot/dts/am335x-sancloud-bbe-icu4.dts +@@ -0,0 +1,198 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ */ ++/dts-v1/; ++ ++#include "am33xx.dtsi" ++#include "am335x-bone-common.dtsi" ++#include "am335x-boneblack-common.dtsi" ++#include "am335x-sancloud-bbe-common.dtsi" ++ ++/ { ++ model = "SanCloud BeagleBone Enhanced + ICU4 Automotive Cape"; ++ compatible = "sancloud,am335x-boneenhanced", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; ++}; ++ ++/ { ++ icu_leds { ++ pinctrl-names = "default", "sleep"; ++ pinctrl-0 = <&user_leds_s1>; ++ pinctrl-1 = <&user_leds_s1_sleep>; ++ ++ compatible = "gpio-leds"; ++ ++ icu_led@2 { ++ label = "beaglebone:red:led1"; ++ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "mmc0"; ++ default-state = "off"; ++ }; ++ ++ icu_led@3 { ++ label = "beaglebone:green:led2"; ++ gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ default-state = "off"; ++ }; ++ ++ icu_led@1 { ++ label = "beaglebone:red:led3"; ++ gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ default-state = "off"; ++ }; ++ ++ icu_led@6 { ++ label = "beaglebone:green:led4"; ++ gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ default-state = "off"; ++ }; ++ ++ icu_led@5 { ++ label = "beaglebone:red:led5"; ++ gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; //"cpu0"; ++ default-state = "off"; ++ }; ++ ++ icu_led@4 { /*CANNOT USE ON V1*/ ++ label = "beaglebone:green:led6"; ++ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ default-state = "off"; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio_buttons_s0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* 17 -> 18 BBE SK7000*/ ++ switch1 { ++ label = "ignition"; ++ linux,code = <0x8f>; /*KEY_WAKEUP*/ ++ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; ++ gpio-key; ++ debounce-interval = <10>; ++ }; ++ ++ /* 18 -> 17 BBE SK7000*/ ++ switch2 { ++ label = "power_on"; ++ linux,code = <0x3b>; /*KEY_F1*/ ++ gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; ++ gpio-key; ++ debounce-interval = <10>; ++ }; ++ }; ++}; ++ ++&am33xx_pinmux { ++ pinctrl-0 = <&usb_hub_ctrl>; ++ ++ user_leds_default: user_leds_default { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a5.gpio1_21 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a6.gpio1_22 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a7.gpio1_23 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a8.gpio1_24 */ ++ >; ++ }; ++ ++ user_leds_sleep: user_leds_sleep { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a5.gpio1_21 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a6.gpio1_22 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a7.gpio1_23 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a8.gpio1_24 */ ++ >; ++ }; ++ ++ dcan0_pins_s0: dcan0_pins_s0 { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLUP, MUX_MODE2) /* d_can0_rx, SLEWCTRL_FAST | RECV_ENABLE | INPUT_PULLUP | MODE2 */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_OUTPUT_PULLUP, MUX_MODE2) /* d_can0_tx, SLEWCTRL_FAST | OUTPUT_PULLUP | MODE2 */ ++ >; ++ }; ++ ++ dcan0_pins_s0_sleep: dcan0_pins_s0_sleep { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLDOWN, MUX_MODE7) /* d_can0_rx, SLEWCTRL_FAST | RECV_ENABLE | INPUT_PULLUP | MODE2 */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE7) /* d_can0_tx, SLEWCTRL_FAST | OUTPUT_PULLUP | MODE2 */ ++ >; ++ }; ++ ++ user_leds_s1: user_leds_s1 { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* mcasp0_fsr.gpio3_19LED1*/ ++ AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKX, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* mcasp0_ahclkx.gpio3_21 LED2 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A1, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a1.gpio1_17 LED3*/ ++ AM33XX_PADCONF(AM335X_PIN_ECAP0_IN_PWM0_OUT, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* eCAP0_in_PWM0_out.gpio0_7 LED4*/ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A0, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a0.gpio1_16 LED5*/ ++ AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* uart1_txd.gpio0_15 LED6*/ ++ >; ++ }; ++ ++ user_leds_s1_sleep: user_leds_s1_sleep { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_INPUT_PULLDOWN, MUX_MODE7) /* mcasp0_fsr.gpio3_19LED1*/ ++ AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKX, PIN_INPUT_PULLDOWN, MUX_MODE7) /* mcasp0_ahclkx.gpio3_21 LED2 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A1, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a1.gpio1_17 LED3*/ ++ AM33XX_PADCONF(AM335X_PIN_ECAP0_IN_PWM0_OUT, PIN_INPUT_PULLDOWN, MUX_MODE7) /* eCAP0_in_PWM0_out.gpio0_7 LED4*/ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A0, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a0.gpio1_16 LED5*/ ++ AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_INPUT_PULLDOWN, MUX_MODE7) /* uart1_txd.gpio0_15 LED6*/ ++ >; ++ }; ++ ++ gpio_buttons_s0: gpio_buttons_s0 { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD11, PIN_INPUT_PULLDOWN, MUX_MODE7) /*gpmc_ad11.gpio0_27 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /*gpmc_clk.gpio2_1 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /*gpmc_ben1.gpio1_28 */ ++ >; ++ }; ++ ++ i2c1_pins: pinmux_i2c1_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_INPUT, MUX_MODE2) /* i2c1_sca */ ++ AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_INPUT, MUX_MODE2) /* i2c1_scl */ ++ >; ++ }; ++}; ++ ++&dcan0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default", "sleep"; /* Apply default pinmuxing */ ++ pinctrl-0 = <&dcan0_pins_s0>; ++ pinctrl-1 = <&dcan0_pins_s0_sleep>; ++ status = "okay"; /* Switch on DCAN0 */ ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mpu6050_pins &lps3331ap_pins>; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins>; ++ status = "okay"; ++ clock-frequency = <400000>; ++ ++ rtc@68 { ++ device_type = "rtc"; ++ reg = <0x68>; ++ compatible = "ds1337"; ++ }; ++}; ++ ++/* Prevent i2c2 working as we need it for DCAN0 interface */ ++&i2c2 { ++ status = "disabled"; ++}; +diff --git a/arch/arm/boot/dts/am335x-sancloud-bbe.dts b/arch/arm/boot/dts/am335x-sancloud-bbe.dts +index e5fdb7abb0d5..640bc1cb7e86 100644 +--- a/arch/arm/boot/dts/am335x-sancloud-bbe.dts ++++ b/arch/arm/boot/dts/am335x-sancloud-bbe.dts +@@ -7,131 +7,9 @@ + #include "am33xx.dtsi" + #include "am335x-bone-common.dtsi" + #include "am335x-boneblack-common.dtsi" +-#include <dt-bindings/interrupt-controller/irq.h> ++#include "am335x-sancloud-bbe-common.dtsi" + + / { + model = "SanCloud BeagleBone Enhanced"; + compatible = "sancloud,am335x-boneenhanced", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; + }; +- +-&am33xx_pinmux { +- pinctrl-names = "default"; +- +- cpsw_default: cpsw_default { +- pinctrl-single,pins = < +- /* Slave 1 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txen.rgmii1_tctl */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ +- >; +- }; +- +- cpsw_sleep: cpsw_sleep { +- pinctrl-single,pins = < +- /* Slave 1 reset value */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) +- >; +- }; +- +- davinci_mdio_default: davinci_mdio_default { +- pinctrl-single,pins = < +- /* MDIO */ +- AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0) +- AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0) +- >; +- }; +- +- davinci_mdio_sleep: davinci_mdio_sleep { +- pinctrl-single,pins = < +- /* MDIO reset value */ +- AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7) +- >; +- }; +- +- usb_hub_ctrl: usb_hub_ctrl { +- pinctrl-single,pins = < +- AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_OUTPUT_PULLUP, MUX_MODE7) /* rmii1_refclk.gpio0_29 */ +- >; +- }; +- +- mpu6050_pins: pinmux_mpu6050_pins { +- pinctrl-single,pins = < +- AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT, MUX_MODE7) /* uart0_ctsn.gpio1_8 */ +- >; +- }; +- +- lps3331ap_pins: pinmux_lps3331ap_pins { +- pinctrl-single,pins = < +- AM33XX_PADCONF(AM335X_PIN_GPMC_A10, PIN_INPUT, MUX_MODE7) /* gpmc_a10.gpio1_26 */ +- >; +- }; +-}; +- +-&mac { +- pinctrl-names = "default", "sleep"; +- pinctrl-0 = <&cpsw_default>; +- pinctrl-1 = <&cpsw_sleep>; +- status = "okay"; +-}; +- +-&davinci_mdio { +- pinctrl-names = "default", "sleep"; +- pinctrl-0 = <&davinci_mdio_default>; +- pinctrl-1 = <&davinci_mdio_sleep>; +- status = "okay"; +- +- ethphy0: ethernet-phy@0 { +- reg = <0>; +- }; +-}; +- +-&cpsw_emac0 { +- phy-handle = <ðphy0>; +- phy-mode = "rgmii-id"; +-}; +- +-&i2c0 { +- lps331ap: barometer@5c { +- compatible = "st,lps331ap-press"; +- st,drdy-int-pin = <1>; +- reg = <0x5c>; +- interrupt-parent = <&gpio1>; +- interrupts = <26 IRQ_TYPE_EDGE_RISING>; +- }; +- +- mpu6050: accelerometer@68 { +- compatible = "invensense,mpu6050"; +- reg = <0x68>; +- interrupt-parent = <&gpio0>; +- interrupts = <2 IRQ_TYPE_EDGE_RISING>; +- orientation = <0xff 0 0 0 1 0 0 0 0xff>; +- }; +- +- usb2512b: usb-hub@2c { +- compatible = "microchip,usb2512b"; +- reg = <0x2c>; +- reset-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; +- /* wifi on port 4 */ +- }; +-}; +diff --git a/arch/arm/boot/dts/am335x-sancloud-bbei-wifi.dts b/arch/arm/boot/dts/am335x-sancloud-bbei-wifi.dts +new file mode 100644 +index 000000000000..813f025e0d6d +--- /dev/null ++++ b/arch/arm/boot/dts/am335x-sancloud-bbei-wifi.dts +@@ -0,0 +1,109 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (C) 2019 Sancloud Ltd ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ */ ++/dts-v1/; ++ ++#include "am33xx.dtsi" ++#include "am335x-bone-common.dtsi" ++#include "am335x-boneblack-common.dtsi" ++#include "am335x-sancloud-bbe-common.dtsi" ++ ++/ { ++ model = "SanCloud BeagleBone Enhanced Industrial WiFi"; ++ compatible = "sancloud,am335x-boneenhanced", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; ++ ++ wlan_en_reg: fixedregulator@2 { ++ compatible = "regulator-fixed"; ++ regulator-name = "wlan-en-regulator"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ startup-delay-us= <100000>; ++ ++ /* RADIO_EN */ ++ gpio = <&gpio1 25 0>; ++ enable-active-high; ++ }; ++}; ++ ++&am33xx_pinmux { ++ mmc3_pins: pinmux_mmc3_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A9, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a9.gpio1_25: RADIO_EN */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad12.mmc2_dat0 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad13.mmc2_dat1 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad14.mmc2_dat2 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad15.mmc2_dat3 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_csn3.mmc2_cmd */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_clk.mmc2_clk */ ++ >; ++ }; ++ ++ bluetooth_pins: pinmux_bluetooth_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_INPUT_PULLUP, MUX_MODE7) /* event_intr0.gpio0_19 */ ++ >; ++ }; ++ ++ uart1_pins: pinmux_uart1_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT, MUX_MODE0) /* uart1_rxd */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_INPUT, MUX_MODE0) /* uart1_txd */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE0) /* uart1_ctsn */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) /* uart1_rtsn */ ++ >; ++ }; ++ ++ nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins { ++ pinctrl-single,pins = <>; ++ }; ++ ++ nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins { ++ pinctrl-single,pins = <>; ++ }; ++}; ++ ++&tda19988 { ++ status = "disabled"; ++}; ++ ++&i2c2 { ++ status = "disabled"; ++}; ++ ++&mmc3 { ++ status = "okay"; ++ vmmc-supply = <&wlan_en_reg>; ++ bus-width = <4>; ++ non-removable; ++ cap-power-off-card; ++ ti,needs-special-hs-handling; ++ keep-power-in-suspend; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_pins>; ++ dmas = <&edma_xbar 12 0 1 ++ &edma_xbar 13 0 2>; ++ dma-names = "tx", "rx"; ++ clock-frequency = <50000000>; ++ max-frequency = <50000000>; ++}; ++ ++&uart1 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins &bluetooth_pins>; ++ ++ bluetooth { ++ status = "okay"; ++ compatible = "qcom,qca6174-bt"; ++ enable-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>; ++ clocks = <&l4ls_clkctrl AM3_L4LS_UART2_CLKCTRL 0>; ++ interrupt-parent = <&gpio0>; ++ interrupts = <19 IRQ_TYPE_EDGE_RISING>; ++ }; ++}; ++ ++&lcdc { ++ status = "disabled"; ++}; +-- +2.26.2 + diff --git a/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable_%.bbappend b/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable_%.bbappend new file mode 100644 index 00000000..72ad30be --- /dev/null +++ b/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-arm-dts-Update-SanCloud-DTS-files.patch" diff --git a/bsp/meta-sancloud/kas/bbe-arago.yml b/bsp/meta-sancloud/kas/bbe-arago.yml new file mode 100644 index 00000000..e1d87db0 --- /dev/null +++ b/bsp/meta-sancloud/kas/bbe-arago.yml @@ -0,0 +1,20 @@ +header: + version: 8 + includes: + - dev/bbe-arago.yml + +repos: + poky: + refspec: febbe2944c0c4a04b85fa98fdc261186115954d8 + meta-openembedded: + refspec: e413c1ef621688e69bb7830bb3151ed23b30b73e + meta-arm: + refspec: 0bd9c740267c0926e89bcfdb489790b7bf1fbd4b + meta-ti: + refspec: f2b2b2095f1a9d3ef705f7518d9db1e3141da2fb + meta-rtlwifi: + refspec: 91dd94630dad98389bfe4e15207e771754bde75c + meta-arago: + refspec: 41cfd83e13955178bffae84ebbe5a915b79181fd + meta-qt5: + refspec: fdd19517e17240b0b61765bd02fc483a1bde986f diff --git a/bsp/meta-sancloud/kas/bbe-poky.yml b/bsp/meta-sancloud/kas/bbe-poky.yml new file mode 100644 index 00000000..6a52bc40 --- /dev/null +++ b/bsp/meta-sancloud/kas/bbe-poky.yml @@ -0,0 +1,16 @@ +header: + version: 8 + includes: + - dev/bbe-poky.yml + +repos: + poky: + refspec: febbe2944c0c4a04b85fa98fdc261186115954d8 + meta-openembedded: + refspec: e413c1ef621688e69bb7830bb3151ed23b30b73e + meta-arm: + refspec: 0bd9c740267c0926e89bcfdb489790b7bf1fbd4b + meta-ti: + refspec: f2b2b2095f1a9d3ef705f7518d9db1e3141da2fb + meta-rtlwifi: + refspec: 91dd94630dad98389bfe4e15207e771754bde75c diff --git a/bsp/meta-sancloud/kas/dev/bbe-arago.yml b/bsp/meta-sancloud/kas/dev/bbe-arago.yml new file mode 100644 index 00000000..903035e4 --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-arago.yml @@ -0,0 +1,42 @@ +header: + version: 8 + includes: + - bbe-poky.yml + +distro: arago +target: + - tisdk-default-image + - tisdk-base-image + +repos: + meta-arago: + url: http://arago-project.org/git/meta-arago.git + path: layers/meta-arago + refspec: dunfell + layers: + meta-arago-distro: + meta-arago-extras: + patches: + skip-packagegroup-sysvinit-boot: + repo: meta-sancloud + path: kas/patches/meta-arago/0001-packagegroup-arago-sysvinit-boot-Skip-recipe-if-sysv.patch + fix-do-create-srcipk: + repo: meta-sancloud + path: kas/patches/meta-arago/0001-linux-copy-defconfig-Only-move-do_create_srcipk-task.patch + meta-qt5: + url: https://github.com/meta-qt5/meta-qt5.git + path: layers/meta-qt5 + refspec: dunfell + meta-openembedded: + layers: + meta-networking: + meta-arm: + layers: + meta-arm-toolchain: + +local_conf_header: + arago: | + PACKAGE_CLASSES = "package_ipk" + TCMODEAPPEND = "" + sstate: | + require conf/include/sancloud-sstate-arago.inc diff --git a/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-lts.yml b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-lts.yml new file mode 100644 index 00000000..51ced230 --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-lts.yml @@ -0,0 +1,8 @@ +header: + version: 8 + includes: + - bbe-poky-kernel-stable.yml + +local_conf_header: + linux_kernel: | + BBE_KERNEL_PROVIDER = "lts" diff --git a/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-mainline.yml b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-mainline.yml new file mode 100644 index 00000000..c39e2dfb --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-mainline.yml @@ -0,0 +1,8 @@ +header: + version: 8 + includes: + - bbe-poky-kernel-stable.yml + +local_conf_header: + linux_kernel: | + BBE_KERNEL_PROVIDER = "mainline" diff --git a/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-stable.yml b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-stable.yml new file mode 100644 index 00000000..81b70a73 --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-stable.yml @@ -0,0 +1,14 @@ +header: + version: 8 + includes: + - bbe-poky.yml + +repos: + meta-kernel: + url: https://gitlab.com/openembedded/community/meta-kernel.git + path: layers/meta-kernel + refspec: master + +local_conf_header: + linux_kernel: | + BBE_KERNEL_PROVIDER = "stable" diff --git a/bsp/meta-sancloud/kas/dev/bbe-poky.yml b/bsp/meta-sancloud/kas/dev/bbe-poky.yml new file mode 100644 index 00000000..0d8f7c5e --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-poky.yml @@ -0,0 +1,68 @@ +header: + version: 8 + +machine: bbe +distro: poky +target: + - core-image-base + +repos: + meta-sancloud: + poky: + url: https://git.yoctoproject.org/git/poky + path: layers/poky + refspec: dunfell + layers: + meta: + meta-poky: + meta-openembedded: + url: https://github.com/openembedded/meta-openembedded.git + path: layers/meta-openembedded + refspec: dunfell + layers: + meta-oe: + meta-python: + meta-arm: + url: https://git.yoctoproject.org/git/meta-arm + path: layers/meta-arm + refspec: dunfell + layers: + meta-arm: + meta-ti: + url: https://git.yoctoproject.org/git/meta-ti + path: layers/meta-ti + refspec: dunfell + meta-rtlwifi: + url: https://github.com/EmbeddedAndroid/meta-rtlwifi.git + path: layers/meta-rtlwifi + refspec: master + +bblayers_conf_header: + base: | + POKY_BBLAYERS_CONF_VERSION = "2" + BBPATH = "${TOPDIR}" + BBFILES ?= "" + +local_conf_header: + base: | + PACKAGE_CLASSES ?= "package_rpm" + SDKMACHINE ?= "x86_64" + EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + USER_CLASSES ?= "buildstats image-mklibs image-prelink" + PATCHRESOLVE = "noop" + BB_DISKMON_DIRS ?= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + CONF_VERSION = "1" + TCLIBCAPPEND = "" + require conf/include/sancloud-mirrors.inc + sstate: | + require conf/include/sancloud-sstate-poky.inc + archiver: | + require conf/include/sancloud-enable-archiver.inc diff --git a/bsp/meta-sancloud/kas/patches/meta-arago/0001-linux-copy-defconfig-Only-move-do_create_srcipk-task.patch b/bsp/meta-sancloud/kas/patches/meta-arago/0001-linux-copy-defconfig-Only-move-do_create_srcipk-task.patch new file mode 100644 index 00000000..dce9abb7 --- /dev/null +++ b/bsp/meta-sancloud/kas/patches/meta-arago/0001-linux-copy-defconfig-Only-move-do_create_srcipk-task.patch @@ -0,0 +1,32 @@ +From aa5193801eb5052eba389f51deacbce7ec74c589 Mon Sep 17 00:00:00 2001 +From: Paul Barker <pbarker@konsulko.com> +Date: Sun, 21 Jun 2020 15:20:02 +0100 +Subject: [master/dunfell][PATCH] linux: copy-defconfig: Only move + do_create_srcipk task if it is defined +To: meta-arago@arago-project.org + +Signed-off-by: Paul Barker <pbarker@konsulko.com> +--- + .../recipes-kernel/linux/copy-defconfig.inc | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc b/meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc +index 10ecf8ea..65b615cb 100644 +--- a/meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc ++++ b/meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc +@@ -17,6 +17,9 @@ do_configure_append() { + fi + } + +-# Move create_srcipk task so that the release defconfig is included. +-deltask do_create_srcipk +-addtask create_srcipk after do_configure before do_compile ++python __anonymous() { ++ # Move create_srcipk task so that the release defconfig is included. ++ if d.getVarFlag('do_create_srcipk', "task"): ++ bb.build.deltask('do_create_srcipk', d) ++ bb.build.addtask('do_create_srcipk', 'do_configure', 'do_compile', d) ++} +-- +2.27.0 + diff --git a/bsp/meta-sancloud/kas/patches/meta-arago/0001-packagegroup-arago-sysvinit-boot-Skip-recipe-if-sysv.patch b/bsp/meta-sancloud/kas/patches/meta-arago/0001-packagegroup-arago-sysvinit-boot-Skip-recipe-if-sysv.patch new file mode 100644 index 00000000..df66e945 --- /dev/null +++ b/bsp/meta-sancloud/kas/patches/meta-arago/0001-packagegroup-arago-sysvinit-boot-Skip-recipe-if-sysv.patch @@ -0,0 +1,35 @@ +From 39c79d5d514ff05fa749bda20d72af18f4b95e12 Mon Sep 17 00:00:00 2001 +From: Paul Barker <pbarker@konsulko.com> +Date: Tue, 9 Jun 2020 11:22:06 +0100 +Subject: [master/dunfell][PATCH] packagegroup-arago-sysvinit-boot: Skip recipe + if sysvinit is not enabled +To: meta-arago@arago-project.org + +This change fixes the following error seen at parse time when the +meta-arago-distro layer is present but sysvinit is not in +DISTRO_FEATURES: + + ERROR: .../meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb: Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (sysvinit) matches the entries enabled in DISTRO_FEATURES + ERROR: Failed to parse recipe: .../meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb + +Signed-off-by: Paul Barker <pbarker@konsulko.com> +--- + .../packagegroups/packagegroup-arago-sysvinit-boot.bb | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb +index 2eb2d777..a6e21745 100644 +--- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb ++++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb +@@ -1,3 +1,8 @@ ++python __anonymous() { ++ if not "sysvinit" in d.getVar("DISTRO_FEATURES").split(): ++ raise bb.parse.SkipRecipe("sysvinit is not enabled") ++} ++ + require recipes-core/packagegroups/packagegroup-core-boot.bb + + PR = "r0" +-- +2.26.2 + diff --git a/bsp/meta-sancloud/meta-sancloud-arago/conf/layer.conf b/bsp/meta-sancloud/meta-sancloud-arago/conf/layer.conf deleted file mode 100644 index a2537125..00000000 --- a/bsp/meta-sancloud/meta-sancloud-arago/conf/layer.conf +++ /dev/null @@ -1,17 +0,0 @@ -# We have a conf and classes directory, append to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have a recipes directory containing .bb and .bbappend files, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "meta-sancloud-arago" -BBFILE_PATTERN_meta-sancloud-arago := "^${LAYERDIR}/" -BBFILE_PRIORITY_meta-sancloud-arago = "9" - -LAYERSERIES_COMPAT_meta-sancloud-arago = "thud" -LAYERDEPENDS_meta-sancloud-arago = " \ - core \ - meta-ti \ - meta-sancloud \ - " diff --git a/bsp/meta-sancloud/recipes-bsp/u-boot/files/boot.cmd b/bsp/meta-sancloud/recipes-bsp/u-boot/files/boot.cmd new file mode 100644 index 00000000..4adec45b --- /dev/null +++ b/bsp/meta-sancloud/recipes-bsp/u-boot/files/boot.cmd @@ -0,0 +1,17 @@ +# Select MMC partition containing this script +setenv devtype mmc +setenv bootpart ${devnum}:${distro_bootpart} + +# Load kernel +run loadimage + +# Load devicetree +run findfdt +run loadfdt + +# Set kernel arguments +part uuid ${devtype} ${bootpart} uuid +setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait ${optargs} + +# Boot Linux +bootz ${loadaddr} - ${fdtaddr} diff --git a/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-bbe.bb b/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-bbe.bb deleted file mode 100644 index 85c56a15..00000000 --- a/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-bbe.bb +++ /dev/null @@ -1,16 +0,0 @@ -HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" -SECTION = "bootloaders" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" - -DEPENDS += "flex-native bison-native" - -require recipes-bsp/u-boot/u-boot.inc - -SRC_URI = "git://github.com/SanCloudLtd/u-boot.git;protocol=https;branch=uboot-bbe-2019.10" -SRCREV = "81a1432e5c4514cc3ca1fec78023afbee638c4f0" -PV = "2019.10+git${SRCPV}" - -S = "${WORKDIR}/git" - -PROVIDES += "u-boot" diff --git a/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-script-bbe.bb b/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-script-bbe.bb new file mode 100644 index 00000000..d97f0708 --- /dev/null +++ b/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-script-bbe.bb @@ -0,0 +1,20 @@ +SUMMARY = "U-boot script for the BBE" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +DEPENDS = "u-boot-mkimage-native" + +SRC_URI = "file://boot.cmd" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_compile() { + mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr +} + +do_install() { + install -d ${D}/boot + install -m 0644 boot.scr ${D}/boot +} + +FILES_${PN} = "/boot" diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19.inc b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19.inc deleted file mode 100644 index 2bf8992a..00000000 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19.inc +++ /dev/null @@ -1,24 +0,0 @@ -SECTION = "kernel" -DESCRIPTION = "Linux kernel for SanCloud BeagleBone devices" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -inherit kernel - -require recipes-kernel/linux/cmem.inc -require recipes-kernel/linux/ti-uio.inc - -# Look in the generic major.minor directory for files -FILESEXTRAPATHS_prepend = "${THISDIR}/linux-bbe-4.19:" - -SRC_URI = "git://github.com/SanCloudLtd/linux.git;protocol=https;branch=${BRANCH}" - -S = "${WORKDIR}/git" - -do_configure_append() { - oe_runmake -C ${S} O=${B} sancloud_bbe_defconfig -} - -# Pull in the devicetree files into the rootfs & add run-time dependency for PM -# firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-devicetree amx3-cm3" diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4.inc b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4.inc new file mode 100644 index 00000000..f12c1f44 --- /dev/null +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4.inc @@ -0,0 +1,32 @@ +SECTION = "kernel" +DESCRIPTION = "Linux kernel for SanCloud BeagleBone devices" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +inherit kernel + +require recipes-kernel/linux/cmem.inc +require recipes-kernel/linux/ti-uio.inc + +# Look in the generic major.minor directory for files +FILESEXTRAPATHS_prepend = "${THISDIR}/linux-bbe-5.4:" + +SRC_URI = "git://github.com/SanCloudLtd/linux.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +KERNEL_CONFIG_COMMAND = "oe_runmake -C ${S} CC="${KERNEL_CC}" LD="${KERNEL_LD}" O=${B} sancloud_bbe_defconfig" + +# Pull in the devicetree files into the rootfs & add run-time dependency for PM +# and prueth firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base += " \ + ${KERNEL_PACKAGE_NAME}-devicetree \ + amx3-cm3 \ + prueth-fw \ + " + +# Special configuration for remoteproc/rpmsg IPC modules +module_conf_rpmsg_client_sample = "blacklist rpmsg_client_sample" +module_conf_ti_k3_r5_remoteproc = "softdep ti_k3_r5_remoteproc pre: virtio_rpmsg_bus" +module_conf_ti_k3_dsp_remoteproc = "softdep ti_k3_dsp_remoteproc pre: virtio_rpmsg_bus" +KERNEL_MODULE_PROBECONF += "rpmsg_client_sample ti_k3_r5_remoteproc ti_k3_dsp_remoteproc" diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/am335x-pru-uio.dtsi b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/am335x-pru-uio.dtsi index 714b1d78..93a40ab5 100644 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/am335x-pru-uio.dtsi +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/am335x-pru-uio.dtsi @@ -1,7 +1,7 @@ &pruss_soc_bus { - uio_pruss_mdio: uio_pruss_mdio@32400 { + uio_pruss_mdio: uio_mdio@4a332400 { compatible = "ti,davinci_mdio"; - reg = <0x32400 0x90>; + reg = <0x4a332400 0x90>; clocks = <&dpll_core_m4_ck>; clock-names = "fck"; bus_freq = <1000000>; diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/cmem.dtsi b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/cmem.dtsi index 23119861..23119861 100644 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/cmem.dtsi +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/cmem.dtsi diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_4.19.bb b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_4.19.bb deleted file mode 100644 index cea5de6e..00000000 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_4.19.bb +++ /dev/null @@ -1,5 +0,0 @@ -BRANCH = "linux-sancloud-rt-4.19.y" -SRCREV = "8cab3d65bea71044d2efbe2b30cfa6ca5c1cd1ad" -PV = "4.19.94+git${SRCPV}" - -require linux-bbe-4.19.inc diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_5.4.bb b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_5.4.bb new file mode 100644 index 00000000..5c8d41bf --- /dev/null +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_5.4.bb @@ -0,0 +1,5 @@ +BRANCH = "linux-sancloud-rt-5.4.y" +SRCREV = "37c7505fe68ae6ade1af735eb4031f3d25f7491c" +PV = "5.4.43+git${SRCPV}" + +require linux-bbe-5.4.inc diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_4.19.bb b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_4.19.bb deleted file mode 100644 index 0aeabaef..00000000 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_4.19.bb +++ /dev/null @@ -1,5 +0,0 @@ -BRANCH = "linux-sancloud-4.19.y" -SRCREV = "1657cbc7b7cf883f629ce5c0b05761401cbbf292" -PV = "4.19.94+git${SRCPV}" - -require linux-bbe-4.19.inc diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_5.4.bb b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_5.4.bb new file mode 100644 index 00000000..34fb401b --- /dev/null +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_5.4.bb @@ -0,0 +1,5 @@ +BRANCH = "linux-sancloud-5.4.y" +SRCREV = "aa7f8f7fec8744ade6af31fbb45ba807559ae47c" +PV = "5.4.40+git${SRCPV}" + +require linux-bbe-5.4.inc diff --git a/bsp/meta-sancloud/scripts/ci-build.sh b/bsp/meta-sancloud/scripts/ci-build.sh new file mode 100755 index 00000000..a94b5108 --- /dev/null +++ b/bsp/meta-sancloud/scripts/ci-build.sh @@ -0,0 +1,12 @@ +#! /bin/bash + +set -e + +CONF=$1 +shift 1 +IMAGES=$@ + +( kas shell kas/dev/${CONF}.yml -c "bitbake --setscene-only ${IMAGES}" || true ) | sed -e '/^NOTE: .*Started$/d' -e '/^NOTE: Running /d' +kas shell kas/dev/${CONF}.yml -c "bitbake --skip-setscene ${IMAGES}" | sed -e '/^NOTE: .*Started$/d' -e '/^NOTE: Running /d' + +mv build/tmp/deploy/images . diff --git a/bsp/meta-sancloud/scripts/release-build.sh b/bsp/meta-sancloud/scripts/release-build.sh new file mode 100755 index 00000000..5ebfce31 --- /dev/null +++ b/bsp/meta-sancloud/scripts/release-build.sh @@ -0,0 +1,33 @@ +#! /bin/bash + +set -euo pipefail + +if [[ $# != 1 ]]; then + echo "ERROR: A single argument must be given to this script to specify the version" + exit 1 +fi + +VERSION=$1 + +mkdir -p release release/sources + +# Create layer tarball +git archive --prefix=meta-sancloud-${VERSION}/ -o release/meta-sancloud-${VERSION}.tar.gz ${VERSION} + +# Create pre-built images +kas build kas/bbe-poky.yml +mv build/tmp/deploy/images release/poky-images +mv build/tmp/deploy/sources/mirror/* release/sources/ +rm -rf build/tmp + +kas build kas/bbe-arago.yml +mv build/tmp/deploy/images release/arago-images +mv build/tmp/deploy/sources/mirror/* release/sources/ +rm -rf build/tmp + +# Automatically generate release notes from tag message +cat > release/ReleaseNotes.txt << EOF +Release Notes +============= +EOF +git tag -l --format='%(contents)' ${VERSION} | sed 1d >> release/ReleaseNotes.txt diff --git a/bsp/meta-sancloud/scripts/release-tag.sh b/bsp/meta-sancloud/scripts/release-tag.sh new file mode 100755 index 00000000..a44ed84b --- /dev/null +++ b/bsp/meta-sancloud/scripts/release-tag.sh @@ -0,0 +1,15 @@ +#! /bin/bash + +set -euo pipefail + +if [[ $# != 1 ]]; then + echo "ERROR: A single argument must be given to this script to specify the version" + exit 1 +fi + +VERSION=$1 + +echo "meta-sancloud ${VERSION}" > tag.txt +markdown-extract -fr "^${VERSION}" ChangeLog.md >> tag.txt +git tag -a -F tag.txt "${VERSION}" HEAD +rm -f tag.txt |