Use Mono's dts
This commit is contained in:
13
README.md
13
README.md
@@ -1,9 +1,20 @@
|
||||
# monok8s
|
||||
|
||||
Kubernetes image for Mono Gateway Development Kit
|
||||
Kubernetes image for Mono Gateway Development Kit
|
||||
|
||||
https://docs.mono.si/gateway-development-kit/getting-started
|
||||
|
||||
### The device's dts files are located at here
|
||||
https://github.com/we-are-mono/OpenWRT-ASK/tree/mono-25.12.0-rc3/target/linux/layerscape/files/arch/arm64/boot/dts/freescale
|
||||
* We need both `mono-gateway-dk-sdk.dts` and `mono-gateway-dk.dts` since the sdk one includes the non-sdk one.
|
||||
* The actual dts being used is the `mono-gateway-dk-sdk.dts`
|
||||
|
||||
|
||||
## Build
|
||||
|
||||
To avoid frequent downloading on rebuild. Find and download the latest [kernel](https://github.com/nxp-qoriq/linux/archive/refs/tags/) and [busybox](https://github.com/mirror/busybox/archive/refs/tags/).
|
||||
Put them into `dev/nxplinux.tar.gz` and `dev/busybox.tar.gz` respectively.
|
||||
|
||||
```bash
|
||||
make itb # for out/board.itb
|
||||
make release # WORK IN PROGRESS
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
};
|
||||
fdt {
|
||||
description = "DTB";
|
||||
data = /incbin/("fsl-ls1046a-rdb-sdk.dtb");
|
||||
data = /incbin/("${DEVICE_TREE_TARGET}.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm64";
|
||||
compression = "none";
|
||||
|
||||
@@ -8,7 +8,7 @@ NXP_VERSION=lf-6.18.2-1.0.0
|
||||
|
||||
# Mono's tutorial said fsl-ls1046a-rdb.dtb but our shipped board is not that one
|
||||
# We need fsl-ls1046a-rdb-sdk.dtb here
|
||||
DTB_TARGET=fsl-ls1046a-rdb-sdk.dtb
|
||||
DEVICE_TREE_TARGET=mono-gateway-dk-sdk
|
||||
|
||||
|
||||
# Arch, should always be arm64 for our board. This is here in case branching off to other devices
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM --platform=linux/amd64 debian:bookworm AS kernel-build
|
||||
FROM --platform=linux/amd64 debian:bookworm-slim AS kernel-build
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@@ -14,6 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
file \
|
||||
flex \
|
||||
git \
|
||||
gettext-base \
|
||||
kmod \
|
||||
libelf-dev \
|
||||
libssl-dev \
|
||||
|
||||
@@ -5,7 +5,7 @@ FROM ${DOCKER_IMAGE_ROOT}/fit-build:${TAG} AS fit
|
||||
|
||||
FROM --platform=linux/amd64 ${DOCKER_IMAGE_ROOT}/build-base:${TAG} AS build
|
||||
|
||||
ARG DTB_TARGET
|
||||
ARG DEVICE_TREE_TARGET
|
||||
|
||||
RUN mkdir /image
|
||||
WORKDIR /image
|
||||
@@ -14,10 +14,11 @@ COPY --from=kernel /out/kernel/Image.gz ./Image.gz
|
||||
COPY --from=kernel /out/kernel/System.map ./
|
||||
COPY --from=kernel /out/kernel/.config ./
|
||||
COPY --from=fit /out/initramfs.cpio.gz ./
|
||||
COPY --from=kernel /out/${DTB_TARGET} ./
|
||||
COPY --from=kernel /out/${DEVICE_TREE_TARGET}.dtb ./
|
||||
|
||||
COPY ./board.its ./
|
||||
COPY ./board.its ./_board.its
|
||||
|
||||
RUN envsubst < _board.its > board.its
|
||||
RUN mkimage -f board.its board.itb
|
||||
|
||||
FROM scratch
|
||||
|
||||
@@ -5,12 +5,14 @@ FROM --platform=linux/amd64 ${DOCKER_IMAGE_ROOT}/build-base:${TAG}
|
||||
ARG NXP_VERSION
|
||||
ARG ARCH
|
||||
ARG CROSS_COMPILE
|
||||
ARG DEVICE_TREE_TARGET
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN test -n "${NXP_VERSION}" || (echo "Please specify NXP_VERSION" >&2; exit 1); \
|
||||
test -n "${ARCH}" || (echo "Please specify ARCH" >&2; exit 1); \
|
||||
test -n "${CROSS_COMPILE}" || (echo "Please specify CROSS_COMPILE" >&2; exit 1)
|
||||
test -n "${CROSS_COMPILE}" || (echo "Please specify CROSS_COMPILE" >&2; exit 1); \
|
||||
test -n "${DEVICE_TREE_TARGET}" || (echo "Please specify DEVICE_TREE_TARGET" >&2; exit 1)
|
||||
|
||||
# Dev-only shortcut
|
||||
COPY dev/nxplinux.tar.gz ./
|
||||
@@ -27,6 +29,12 @@ RUN tar -xf nxplinux.tar.gz \
|
||||
WORKDIR /build/nxplinux
|
||||
|
||||
COPY kernel-extra.config /tmp/kernel-extra.config
|
||||
COPY kernel-build/dts/*.dts ./arch/arm64/boot/dts/freescale/
|
||||
|
||||
RUN grep -q "^dtb-\\\$(CONFIG_ARCH_LAYERSCAPE) += ${DEVICE_TREE_TARGET}.dtb$" \
|
||||
arch/arm64/boot/dts/freescale/Makefile \
|
||||
|| echo "dtb-\$(CONFIG_ARCH_LAYERSCAPE) += ${DEVICE_TREE_TARGET}.dtb" \
|
||||
>> arch/arm64/boot/dts/freescale/Makefile
|
||||
|
||||
# NXP tree: use the LSDK defconfig target
|
||||
RUN make ARCH="${ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" defconfig lsdk.config \
|
||||
@@ -43,7 +51,5 @@ RUN mkdir -p /out/kernel /out/rootfs \
|
||||
|
||||
RUN depmod -b /out/rootfs $(ls /out/rootfs/lib/modules/)
|
||||
|
||||
ARG DTB_TARGET
|
||||
|
||||
RUN find /out/kernel -name "${DTB_TARGET}" -exec cp {} /out/ \;
|
||||
RUN test -f "/out/${DTB_TARGET}"
|
||||
RUN find /out/kernel -name "${DEVICE_TREE_TARGET}.dtb" -exec cp {} /out/ \;
|
||||
RUN test -f "/out/${DEVICE_TREE_TARGET}.dtb"
|
||||
|
||||
531
kernel-build/dts/mono-gateway-dk-sdk.dts
Normal file
531
kernel-build/dts/mono-gateway-dk-sdk.dts
Normal file
@@ -0,0 +1,531 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Device Tree file for Freescale Layerscape-1046A family SoC.
|
||||
*
|
||||
* Copyright 2025 Mono Technologies Inc.
|
||||
*
|
||||
* Author: Tomaz Zaman <tomaz@mono.si>
|
||||
*/
|
||||
|
||||
#include "mono-gateway-dk.dts"
|
||||
#include "qoriq-qman-portals-sdk.dtsi"
|
||||
#include "qoriq-bman-portals-sdk.dtsi"
|
||||
|
||||
/ {
|
||||
/* Boot memory regions for SDK DPAA driver */
|
||||
bootmem0@a0000000 {
|
||||
reg = <0x00 0xa0000000 0x00 0x4000000 0x00 0xa4000000 0x00 0x6000000>;
|
||||
};
|
||||
|
||||
bootmem1@aa000000 {
|
||||
reg = <0x00 0xaa000000 0x00 0x4000000 0x00 0xae000000 0x00 0x6000000>;
|
||||
};
|
||||
|
||||
cpus {
|
||||
fman0-extended-args {
|
||||
cell-index = <0x00>;
|
||||
compatible = "fsl,fman-extended-args";
|
||||
total-fifo-size = <0x3e500>;
|
||||
|
||||
/* Offline ports for CDX - cell-index overridden for SDK compatibility:
|
||||
* fman0_oh_0x3 (port@83000) = cell-index 1 (SDK style)
|
||||
* fman0_oh_0x4 (port@84000) = cell-index 2 (SDK style)
|
||||
*/
|
||||
fman0_oh_0x3-extended-args {
|
||||
cell-index = <0x01>; /* matches port@83000 SDK cell-index */
|
||||
compatible = "fsl,fman-port-op-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
|
||||
fman0_oh_0x4-extended-args {
|
||||
cell-index = <0x02>; /* matches port@84000 SDK cell-index */
|
||||
compatible = "fsl,fman-port-op-extended-args";
|
||||
fifo-size = <0x900 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
|
||||
/* All 1G ports need extended-args (SDK driver requirement) */
|
||||
|
||||
/* MAC1 (ethernet@e0000) - cell-index 0 - disabled but needed */
|
||||
fman0_rx0-extended-args {
|
||||
cell-index = <0x00>;
|
||||
compatible = "fsl,fman-port-1g-rx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
vsp-window = <0x02 0x00>;
|
||||
};
|
||||
|
||||
fman0_tx0-extended-args {
|
||||
cell-index = <0x00>;
|
||||
compatible = "fsl,fman-port-1g-tx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
|
||||
/* MAC2 (ethernet@e2000) - cell-index 1 */
|
||||
fman0_rx1-extended-args {
|
||||
cell-index = <0x01>;
|
||||
compatible = "fsl,fman-port-1g-rx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
vsp-window = <0x02 0x00>;
|
||||
};
|
||||
|
||||
fman0_tx1-extended-args {
|
||||
cell-index = <0x01>;
|
||||
compatible = "fsl,fman-port-1g-tx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
|
||||
/* MAC3 (ethernet@e4000) - cell-index 2 - disabled but needed */
|
||||
fman0_rx2-extended-args {
|
||||
cell-index = <0x02>;
|
||||
compatible = "fsl,fman-port-1g-rx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
vsp-window = <0x02 0x00>;
|
||||
};
|
||||
|
||||
fman0_tx2-extended-args {
|
||||
cell-index = <0x02>;
|
||||
compatible = "fsl,fman-port-1g-tx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
|
||||
/* MAC4 (ethernet@e6000) - cell-index 3 - disabled but needed */
|
||||
fman0_rx3-extended-args {
|
||||
cell-index = <0x03>;
|
||||
compatible = "fsl,fman-port-1g-rx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
vsp-window = <0x02 0x00>;
|
||||
};
|
||||
|
||||
fman0_tx3-extended-args {
|
||||
cell-index = <0x03>;
|
||||
compatible = "fsl,fman-port-1g-tx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
|
||||
/* MAC5 (ethernet@e8000) - cell-index 4 */
|
||||
fman0_rx4-extended-args {
|
||||
cell-index = <0x04>;
|
||||
compatible = "fsl,fman-port-1g-rx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
vsp-window = <0x02 0x00>;
|
||||
};
|
||||
|
||||
fman0_tx4-extended-args {
|
||||
cell-index = <0x04>;
|
||||
compatible = "fsl,fman-port-1g-tx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
|
||||
/* MAC6 (ethernet@ea000) - cell-index 5 */
|
||||
fman0_rx5-extended-args {
|
||||
cell-index = <0x05>;
|
||||
compatible = "fsl,fman-port-1g-rx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
vsp-window = <0x02 0x00>;
|
||||
};
|
||||
|
||||
fman0_tx5-extended-args {
|
||||
cell-index = <0x05>;
|
||||
compatible = "fsl,fman-port-1g-tx-extended-args";
|
||||
fifo-size = <0x3200 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
|
||||
/* MAC9 (ethernet@f0000) - 10G cell-index 0 */
|
||||
fman0_rx6-extended-args {
|
||||
cell-index = <0x00>;
|
||||
compatible = "fsl,fman-port-10g-rx-extended-args";
|
||||
fifo-size = <0x6000 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
vsp-window = <0x02 0x00>;
|
||||
};
|
||||
|
||||
fman0_tx6-extended-args {
|
||||
cell-index = <0x00>;
|
||||
compatible = "fsl,fman-port-10g-tx-extended-args";
|
||||
fifo-size = <0x4000 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
|
||||
/* MAC10 (ethernet@f2000) - 10G cell-index 1 */
|
||||
fman0_rx7-extended-args {
|
||||
cell-index = <0x01>;
|
||||
compatible = "fsl,fman-port-10g-rx-extended-args";
|
||||
fifo-size = <0x6000 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
vsp-window = <0x02 0x00>;
|
||||
};
|
||||
|
||||
fman0_tx7-extended-args {
|
||||
cell-index = <0x01>;
|
||||
compatible = "fsl,fman-port-10g-tx-extended-args";
|
||||
fifo-size = <0x4000 0x00>;
|
||||
buffer-layout = <0x60 0x40>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&bman_fbpr {
|
||||
compatible = "fsl,bman-fbpr";
|
||||
alloc-ranges = <0 0 0x10000 0>;
|
||||
};
|
||||
&qman_fqd {
|
||||
compatible = "fsl,qman-fqd";
|
||||
alloc-ranges = <0 0 0x10000 0>;
|
||||
};
|
||||
&qman_pfdr {
|
||||
compatible = "fsl,qman-pfdr";
|
||||
alloc-ranges = <0 0 0x10000 0>;
|
||||
};
|
||||
|
||||
&soc {
|
||||
/delete-property/ dma-coherent;
|
||||
|
||||
#include "qoriq-dpaa-eth.dtsi"
|
||||
/* Note: We override cell-index values in &fman0 section to match
|
||||
* SDK driver expectations (0-5 instead of mainline 2-7).
|
||||
* Port@82000 with cell-index=0 becomes the HC port for PCD.
|
||||
*/
|
||||
|
||||
pcie@3400000 {
|
||||
/delete-property/ iommu-map;
|
||||
};
|
||||
|
||||
pcie@3500000 {
|
||||
/delete-property/ iommu-map;
|
||||
};
|
||||
|
||||
pcie@3600000 {
|
||||
/delete-property/ iommu-map;
|
||||
};
|
||||
|
||||
/delete-node/ iommu@9000000;
|
||||
};
|
||||
|
||||
&fsldpaa {
|
||||
ethernet@0 {
|
||||
status = "disabled"; /* MAC1 - not on Mono Gateway DK */
|
||||
};
|
||||
ethernet@2 {
|
||||
status = "disabled"; /* MAC3 - not on Mono Gateway DK */
|
||||
};
|
||||
ethernet@3 {
|
||||
status = "disabled"; /* MAC4 - not on Mono Gateway DK */
|
||||
};
|
||||
|
||||
/* Enabled from qoriq-dpaa-eth.dtsi:
|
||||
* ethernet@1 = enet1 = MAC2
|
||||
* ethernet@4 = enet4 = MAC5
|
||||
* ethernet@5 = enet5 = MAC6
|
||||
* ethernet@8 = enet6 = MAC9 (10G)
|
||||
*/
|
||||
|
||||
/* Add MAC10 - not in qoriq-dpaa-eth.dtsi */
|
||||
ethernet@9 {
|
||||
compatible = "fsl,dpa-ethernet";
|
||||
fsl,fman-mac = <&enet7>;
|
||||
dma-coherent;
|
||||
};
|
||||
};
|
||||
|
||||
&fman0 {
|
||||
compatible = "fsl,fman", "simple-bus";
|
||||
|
||||
/* Core FMan sub-modules */
|
||||
muram@0 {
|
||||
compatible = "fsl,fman-muram";
|
||||
reg = <0x0 0x60000>;
|
||||
};
|
||||
|
||||
bmi@80000 {
|
||||
compatible = "fsl,fman-bmi";
|
||||
reg = <0x80000 0x400>;
|
||||
};
|
||||
|
||||
qmi@80400 {
|
||||
compatible = "fsl,fman-qmi";
|
||||
reg = <0x80400 0x400>;
|
||||
};
|
||||
|
||||
/* PCD sub-modules required for FMC/CDX */
|
||||
cc {
|
||||
compatible = "fsl,fman-cc";
|
||||
};
|
||||
|
||||
policer@c0000 {
|
||||
compatible = "fsl,fman-policer";
|
||||
reg = <0xc0000 0x1000>;
|
||||
};
|
||||
|
||||
keygen@c1000 {
|
||||
compatible = "fsl,fman-keygen";
|
||||
reg = <0xc1000 0x1000>;
|
||||
};
|
||||
|
||||
dma@c2000 {
|
||||
compatible = "fsl,fman-dma";
|
||||
reg = <0xc2000 0x1000>;
|
||||
};
|
||||
|
||||
fpm@c3000 {
|
||||
compatible = "fsl,fman-fpm";
|
||||
reg = <0xc3000 0x1000>;
|
||||
};
|
||||
|
||||
parser@c7000 {
|
||||
compatible = "fsl,fman-parser";
|
||||
reg = <0xc7000 0x1000>;
|
||||
};
|
||||
|
||||
vsps@dc000 {
|
||||
compatible = "fsl,fman-vsps";
|
||||
reg = <0xdc000 0x1000>;
|
||||
};
|
||||
|
||||
ethernet@f0000 {
|
||||
/delete-property/ managed;
|
||||
fixed-link = <0 1 10000 0 0>;
|
||||
phy-connection-type = "xgmii";
|
||||
};
|
||||
|
||||
ethernet@f2000 {
|
||||
/delete-property/ managed;
|
||||
fixed-link = <0 1 10000 0 0>;
|
||||
phy-connection-type = "xgmii";
|
||||
};
|
||||
|
||||
/* DPA Offline port bindings - required for CDX.
|
||||
* Use phandles fman0_oh_0x3 (port@83000) and fman0_oh_0x4 (port@84000).
|
||||
* Cell-index overridden to SDK-style (1 and 2) in port nodes above.
|
||||
*/
|
||||
dpa-fman0-oh@2 {
|
||||
compatible = "fsl,dpa-oh";
|
||||
fsl,qman-frame-queues-oh = <0x60 0x01 0x61 0x01>;
|
||||
fsl,fman-oh-port = <&fman0_oh_0x3>;
|
||||
};
|
||||
|
||||
dpa-fman0-oh@3 {
|
||||
compatible = "fsl,dpa-oh";
|
||||
fsl,qman-frame-queues-oh = <0x62 0x01 0x63 0x01>;
|
||||
fsl,fman-oh-port = <&fman0_oh_0x4>;
|
||||
};
|
||||
|
||||
/* Override OH port cell-index values for SDK driver compatibility.
|
||||
* SDK driver expects cell-index 0 for HC (Host Command/PCD) port.
|
||||
* Mainline qoriq-fman3-0.dtsi uses cell-index 2-7, but SDK needs 0-5.
|
||||
*/
|
||||
port@82000 {
|
||||
cell-index = <0>; /* HC port - required for PCD initialization */
|
||||
compatible = "fsl,fman-port-oh";
|
||||
};
|
||||
|
||||
port@83000 {
|
||||
cell-index = <1>;
|
||||
compatible = "fsl,fman-port-oh";
|
||||
};
|
||||
|
||||
port@84000 {
|
||||
cell-index = <2>;
|
||||
compatible = "fsl,fman-port-oh";
|
||||
};
|
||||
|
||||
port@85000 {
|
||||
cell-index = <3>;
|
||||
compatible = "fsl,fman-port-oh";
|
||||
};
|
||||
|
||||
port@86000 {
|
||||
cell-index = <4>;
|
||||
compatible = "fsl,fman-port-oh";
|
||||
};
|
||||
|
||||
port@87000 {
|
||||
cell-index = <5>;
|
||||
compatible = "fsl,fman-port-oh";
|
||||
};
|
||||
};
|
||||
|
||||
&clockgen {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&scfg {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&crypto {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&dcfg {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&ifc {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&qspi {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&esdhc {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&ddr {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&tmu {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&qman {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&bman {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&bportals {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&qportals {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&dspi {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&duart0 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&duart1 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&duart2 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&duart3 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&gpio2 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&lpuart0 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&lpuart1 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&lpuart2 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&lpuart3 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&lpuart4 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&lpuart5 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&ftm_alarm0 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&wdog0 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&edma0 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&sata {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&qdma {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&msi1 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&msi2 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&msi3 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&fman0 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&ptp_timer0 {
|
||||
dma-coherent;
|
||||
};
|
||||
|
||||
&fsldpaa {
|
||||
dma-coherent;
|
||||
};
|
||||
531
kernel-build/dts/mono-gateway-dk.dts
Normal file
531
kernel-build/dts/mono-gateway-dk.dts
Normal file
@@ -0,0 +1,531 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Device Tree file for Freescale Layerscape-1046A family SoC.
|
||||
*
|
||||
* Copyright 2025 Mono Technologies Inc.
|
||||
*
|
||||
* Author: Tomaz Zaman <tomaz@mono.si>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
#include "fsl-ls1046a.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Mono Gateway Development Kit";
|
||||
compatible = "mono,gateway-dk", "fsl,ls1046a";
|
||||
|
||||
aliases {
|
||||
serial0 = &duart0;
|
||||
serial1 = &duart1;
|
||||
|
||||
/* Physical port order: left to right */
|
||||
ethernet0 = &enet4; /* MAC5 - 1G leftmost */
|
||||
ethernet1 = &enet5; /* MAC6 - 1G middle */
|
||||
ethernet2 = &enet1; /* MAC2 - 1G rightmost */
|
||||
ethernet3 = &enet6; /* MAC9 - 10G left */
|
||||
ethernet4 = &enet7; /* MAC10 - 10G right */
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
/* SFP+ Port 0 LEDs - Activity/Link */
|
||||
led_sfp0_link: sfp0_link {
|
||||
label = "sfp0:link";
|
||||
gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led_sfp0_activity: sfp0_activity {
|
||||
label = "sfp0:activity";
|
||||
gpios = <&gpio2 18 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
/* SFP+ Port 1 LEDs - Activity/Link */
|
||||
led_sfp1_link: sfp1_link {
|
||||
label = "sfp1:link";
|
||||
gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led_sfp1_activity: sfp1_activity {
|
||||
label = "sfp1:activity";
|
||||
gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
|
||||
/* SFP 1 */
|
||||
sfp_xfi0: sfp-xfi0 {
|
||||
compatible = "sff,sfp";
|
||||
i2c-bus = <&sfp0_i2c>;
|
||||
tx-disable-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;
|
||||
mod-def0-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
|
||||
los-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
|
||||
maximum-power-milliwatt = <3000>;
|
||||
leds = <&led_sfp0_link>, <&led_sfp0_activity>;
|
||||
};
|
||||
|
||||
/* SFP 2 */
|
||||
sfp_xfi1: sfp-xfi1 {
|
||||
compatible = "sff,sfp";
|
||||
i2c-bus = <&sfp1_i2c>;
|
||||
tx-disable-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
|
||||
mod-def0-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
|
||||
los-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
|
||||
maximum-power-milliwatt = <3000>;
|
||||
leds = <&led_sfp1_link>, <&led_sfp1_activity>;
|
||||
};
|
||||
|
||||
/* SFP LED Controller */
|
||||
sfp_led_controller: sfp-led-controller {
|
||||
compatible = "mono,sfp-led";
|
||||
sfp-ports = <&sfp_xfi0>, <&sfp_xfi1>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&pcie3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio2 {
|
||||
2R-enable {
|
||||
gpio-hog;
|
||||
gpios = <6 GPIO_ACTIVE_LOW>;
|
||||
output-high;
|
||||
line-name = "2r-enable";
|
||||
};
|
||||
|
||||
3R-enable {
|
||||
gpio-hog;
|
||||
gpios = <2 GPIO_ACTIVE_LOW>;
|
||||
output-low;
|
||||
line-name = "3r-enable";
|
||||
};
|
||||
|
||||
uart-mux {
|
||||
gpio-hog;
|
||||
gpios = <26 GPIO_ACTIVE_HIGH>;
|
||||
output-high; /* "output-high" for 2R, "output-low" for 3R */
|
||||
line-name = "uart-mux";
|
||||
};
|
||||
};
|
||||
|
||||
&duart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&duart1 {
|
||||
status = "okay";
|
||||
uart-has-rtscts;
|
||||
|
||||
bluetooth {
|
||||
compatible = "nxp,88w8987-bt";
|
||||
fw-init-baudrate = <3000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&usb0 {
|
||||
status = "okay";
|
||||
dr_mode = "host";
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
status = "disabled";
|
||||
disable-over-current;
|
||||
};
|
||||
|
||||
&usb2 {
|
||||
status = "disabled";
|
||||
disable-over-current;
|
||||
};
|
||||
|
||||
&dspi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&esdhc {
|
||||
status = "okay";
|
||||
mmc-hs200-1_8v;
|
||||
bus-width = <4>;
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
/* Thermal sensors, retimer, clock genenerator, PWM fan */
|
||||
i2c-mux@70 {
|
||||
compatible = "nxp,pca9545";
|
||||
reg = <0x70>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
i2c@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
|
||||
retimer: retimer@18 {
|
||||
compatible = "ti,ds100df410";
|
||||
reg = <0x18>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
i2c@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
|
||||
temp-sensor@4c {
|
||||
compatible = "ti,tmp431";
|
||||
reg = <0x4c>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
|
||||
temp-sensor@4c {
|
||||
compatible = "ti,tmp431";
|
||||
reg = <0x4c>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c@3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3>;
|
||||
|
||||
fan_controller: fan-controller@2e {
|
||||
compatible = "microchip,emc2305";
|
||||
reg = <0x2e>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#pwm-cells = <3>;
|
||||
|
||||
fan0: fan@0 {
|
||||
reg = <0>;
|
||||
label = "System Fan 1";
|
||||
pwms = <&fan_controller 26000 1 1>;
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
fan1: fan@1 {
|
||||
reg = <1>;
|
||||
label = "System Fan 2";
|
||||
pwms = <&fan_controller 26000 1 1>;
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
|
||||
/* SFP+ modules */
|
||||
sfpmux: i2c-mux@70 {
|
||||
compatible = "nxp,pca9545";
|
||||
reg = <0x70>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
sfp0_i2c: i2c@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
sfp1_i2c: i2c@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
i2c-mux@70 {
|
||||
compatible = "nxp,pca9545";
|
||||
reg = <0x70>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
i2c@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
|
||||
power_sensor@40 {
|
||||
compatible = "ti,ina234";
|
||||
reg = <0x40>;
|
||||
label = "USB Power Delivery";
|
||||
#io-channel-cells = <1>;
|
||||
shunt-resistor = <1000>;
|
||||
};
|
||||
power_sensor@41 {
|
||||
compatible = "ti,ina234";
|
||||
reg = <0x41>;
|
||||
label = "5V PSU";
|
||||
#io-channel-cells = <1>;
|
||||
shunt-resistor = <1000>;
|
||||
};
|
||||
power_sensor@42 {
|
||||
compatible = "ti,ina234";
|
||||
reg = <0x42>;
|
||||
label = "1V Core PSU";
|
||||
#io-channel-cells = <1>;
|
||||
shunt-resistor = <1000>;
|
||||
};
|
||||
power_sensor@43 {
|
||||
compatible = "ti,ina234";
|
||||
reg = <0x43>;
|
||||
label = "1.2V DDR PSU";
|
||||
#io-channel-cells = <1>;
|
||||
shunt-resistor = <5000>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
|
||||
power_sensor@40 {
|
||||
compatible = "ti,ina234";
|
||||
reg = <0x40>;
|
||||
label = "1.35V SerDes PSU";
|
||||
#io-channel-cells = <1>;
|
||||
shunt-resistor = <5000>;
|
||||
};
|
||||
power_sensor@41 {
|
||||
compatible = "ti,ina234";
|
||||
reg = <0x41>;
|
||||
label = "1.8V PSU";
|
||||
#io-channel-cells = <1>;
|
||||
shunt-resistor = <5000>;
|
||||
};
|
||||
power_sensor@42 {
|
||||
compatible = "ti,ina234";
|
||||
reg = <0x42>;
|
||||
label = "2.5V DDR PSU";
|
||||
#io-channel-cells = <1>;
|
||||
shunt-resistor = <5000>;
|
||||
};
|
||||
power_sensor@43 {
|
||||
compatible = "ti,ina234";
|
||||
reg = <0x43>;
|
||||
label = "3.3V PSU";
|
||||
#io-channel-cells = <1>;
|
||||
shunt-resistor = <1000>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
|
||||
rtc@53 {
|
||||
compatible = "nxp,pcf2131";
|
||||
reg = <0x53>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
typec: hd3ss3220@47 {
|
||||
compatible = "ti,hd3ss3220";
|
||||
reg = <0x47>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c@3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3>;
|
||||
|
||||
lp5810@6c {
|
||||
compatible = "ti,lp5812";
|
||||
reg = <0x6c>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led@0 {
|
||||
reg = <0>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
label = "status:white";
|
||||
led-max-microamp = <25500>;
|
||||
};
|
||||
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
label = "status:blue";
|
||||
led-max-microamp = <25500>;
|
||||
};
|
||||
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
label = "status:green";
|
||||
led-max-microamp = <25500>;
|
||||
};
|
||||
|
||||
led@3 {
|
||||
reg = <3>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
label = "status:red";
|
||||
led-max-microamp = <25500>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qspi {
|
||||
status = "okay";
|
||||
|
||||
mt25qu512a0: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <0>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@flash {
|
||||
label = "flash";
|
||||
reg = <0x0 0x4000000>;
|
||||
};
|
||||
|
||||
partition@0 {
|
||||
label = "rcw-bl2";
|
||||
reg = <0x0 0x100000>;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "uboot";
|
||||
reg = <0x100000 0x200000>;
|
||||
};
|
||||
|
||||
partition@300000 {
|
||||
label = "uboot-env";
|
||||
reg = <0x300000 0x100000>;
|
||||
};
|
||||
|
||||
partition@400000 {
|
||||
label = "fman-ucode";
|
||||
reg = <0x400000 0x100000>;
|
||||
};
|
||||
|
||||
partition@500000 {
|
||||
label = "recovery-dtb";
|
||||
reg = <0x500000 0x100000>;
|
||||
};
|
||||
|
||||
partition@600000 {
|
||||
label = "backup";
|
||||
reg = <0x600000 0x400000>;
|
||||
};
|
||||
|
||||
partition@a00000 {
|
||||
label = "kernel-initramfs";
|
||||
reg = <0xa00000 0x1600000>;
|
||||
};
|
||||
|
||||
partition@2000000 {
|
||||
label = "unallocated";
|
||||
reg = <0x2000000 0x2000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#include "fsl-ls1046-post.dtsi"
|
||||
|
||||
&fman0 {
|
||||
ethernet@e0000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ethernet@e4000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ethernet@e6000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ethernet@e8000 {
|
||||
phy-handle = <&sgmii_phy0>;
|
||||
phy-connection-type = "sgmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ethernet@ea000 {
|
||||
phy-handle = <&sgmii_phy1>;
|
||||
phy-connection-type = "sgmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ethernet@e2000 {
|
||||
phy-handle = <&sgmii_phy2>;
|
||||
phy-connection-type = "sgmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
fm1_mac9: ethernet@f0000 { /* 10GEC1 */
|
||||
sfp = <&sfp_xfi0>;
|
||||
phy-connection-type = "10gbase-r";
|
||||
managed = "in-band-status";
|
||||
pcs-handle-names = "xfi"; /* Match enet7 for consistency */
|
||||
};
|
||||
|
||||
fm1_mac10: ethernet@f2000 { /* 10GEC2 */
|
||||
sfp = <&sfp_xfi1>;
|
||||
phy-connection-type = "10gbase-r";
|
||||
managed = "in-band-status";
|
||||
};
|
||||
|
||||
mdio@fc000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mdio@fd000 {
|
||||
sgmii_phy0: ethernet-phy@0 {
|
||||
reg = <0x0>;
|
||||
};
|
||||
|
||||
sgmii_phy1: ethernet-phy@1 {
|
||||
reg = <0x1>;
|
||||
};
|
||||
|
||||
sgmii_phy2: ethernet-phy@2 {
|
||||
reg = <0x2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
4
makefile
4
makefile
@@ -17,7 +17,7 @@ kernel-build: build-base
|
||||
--build-arg ARCH=$(ARCH) \
|
||||
--build-arg CROSS_COMPILE=$(CROSS_COMPILE) \
|
||||
--build-arg NXP_VERSION=$(NXP_VERSION) \
|
||||
--build-arg DTB_TARGET=$(DTB_TARGET) \
|
||||
--build-arg DEVICE_TREE_TARGET=$(DEVICE_TREE_TARGET) \
|
||||
-t $(DOCKER_IMAGE_ROOT)/kernel-build:$(TAG) .
|
||||
|
||||
fit-build: kernel-build
|
||||
@@ -36,6 +36,6 @@ itb: fit-build
|
||||
--build-arg DOCKER_IMAGE_ROOT=$(DOCKER_IMAGE_ROOT) \
|
||||
--build-arg TAG=$(TAG) \
|
||||
--build-arg ARCH=$(ARCH) \
|
||||
--build-arg DTB_TARGET=$(DTB_TARGET) \
|
||||
--build-arg DEVICE_TREE_TARGET=$(DEVICE_TREE_TARGET) \
|
||||
--output type=local,dest=./out \
|
||||
-t $(DOCKER_IMAGE_ROOT)/itb:$(TAG) .
|
||||
|
||||
Reference in New Issue
Block a user