Split repo: remove generic Aimee OS
Splitting the Home Assistant Yellow configuration into its own repository; the generic Aimee OS build system and configuration are now tracked in a separate repository.
This commit is contained in:
1
portage/host/etc/portage/env/nobuildpkg
vendored
Normal file
1
portage/host/etc/portage/env/nobuildpkg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
FEATURES=-buildpkg
|
||||
1
portage/host/etc/portage/make.conf/15-keywords.conf
Normal file
1
portage/host/etc/portage/make.conf/15-keywords.conf
Normal file
@@ -0,0 +1 @@
|
||||
ACCEPT_KEYWORDS="${ARCH}"
|
||||
2
portage/host/etc/portage/make.conf/20-binpkgs.conf
Normal file
2
portage/host/etc/portage/make.conf/20-binpkgs.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
FEATURES="${FEATURES} binpkg-multi-instance buildpkg"
|
||||
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg --binpkg-respect-use=y"
|
||||
2
portage/host/etc/portage/make.conf/80-quiet.conf
Normal file
2
portage/host/etc/portage/make.conf/80-quiet.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --quiet-build=y --quiet-fail=y"
|
||||
FEATURES="${FEATURES} -news"
|
||||
1
portage/host/etc/portage/make.profile
Symbolic link
1
portage/host/etc/portage/make.profile
Symbolic link
@@ -0,0 +1 @@
|
||||
/var/db/repos/gentoo/profiles/default/linux/amd64/17.1/no-multilib
|
||||
@@ -0,0 +1 @@
|
||||
sys-fs/genimage ~amd64
|
||||
1
portage/host/etc/portage/package.accept_keywords/kernel
Normal file
1
portage/host/etc/portage/package.accept_keywords/kernel
Normal file
@@ -0,0 +1 @@
|
||||
sys-kernel/raspberrypi-sources **
|
||||
6
portage/host/etc/portage/package.env/kernel
Normal file
6
portage/host/etc/portage/package.env/kernel
Normal file
@@ -0,0 +1,6 @@
|
||||
# vim: set ft=gentoo-package-use :
|
||||
|
||||
# Dustin C. Hatch <dustin@hatch.name> (09 Feb 2023)
|
||||
# Do not build binary packages for kernel sources
|
||||
sys-kernel/gentoo-sources nobuildpkg
|
||||
sys-kernel/raspberrypi-sources nobuildpkg
|
||||
1
portage/host/etc/portage/package.use/btrfs-progs
Normal file
1
portage/host/etc/portage/package.use/btrfs-progs
Normal file
@@ -0,0 +1 @@
|
||||
sys-fs/btrfs-progs -man
|
||||
1
portage/host/etc/portage/package.use/git
Normal file
1
portage/host/etc/portage/package.use/git
Normal file
@@ -0,0 +1 @@
|
||||
dev-vcs/git -perl
|
||||
1
portage/host/etc/portage/package.use/grub
Normal file
1
portage/host/etc/portage/package.use/grub
Normal file
@@ -0,0 +1 @@
|
||||
sys-boot/grub -* GRUB_PLATFORMS: -*
|
||||
2
portage/host/etc/portage/package.use/kernel
Normal file
2
portage/host/etc/portage/package.use/kernel
Normal file
@@ -0,0 +1,2 @@
|
||||
sys-kernel/gentoo-sources symlink
|
||||
sys-kernel/raspberrypi-sources symlink
|
||||
2
portage/host/etc/portage/package.use/selinux
Normal file
2
portage/host/etc/portage/package.use/selinux
Normal file
@@ -0,0 +1,2 @@
|
||||
sys-libs/libselinux python
|
||||
sys-process/audit python
|
||||
1
portage/host/etc/portage/package.use/squashfs-tools
Normal file
1
portage/host/etc/portage/package.use/squashfs-tools
Normal file
@@ -0,0 +1 @@
|
||||
sys-fs/squashfs-tools zstd
|
||||
4
portage/host/etc/portage/package.use/systemd
Normal file
4
portage/host/etc/portage/package.use/systemd
Normal file
@@ -0,0 +1,4 @@
|
||||
sys-apps/dbus systemd
|
||||
sys-apps/systemd -*
|
||||
sec-policy/selinux-base systemd
|
||||
sec-policy/selinux-base-policy systemd
|
||||
@@ -0,0 +1,659 @@
|
||||
From b28a8f5b591841f88f19cbf9850d713a602d912e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Apr 2022 14:47:59 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: Add device tree for Home Assistant Yellow
|
||||
|
||||
Add device tree for Home Assistant Yellow, a Compute Module 4 based I/O
|
||||
board.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
.../boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 598 ++++++++++++++++++
|
||||
arch/arm64/boot/dts/broadcom/Makefile | 1 +
|
||||
.../broadcom/bcm2711-rpi-cm4-ha-yellow.dts | 1 +
|
||||
4 files changed, 602 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 3dfe451bcb16..d147c3400732 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -18,7 +18,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
|
||||
bcm2709-rpi-cm2.dtb \
|
||||
bcm2710-rpi-cm3.dtb \
|
||||
bcm2711-rpi-cm4.dtb \
|
||||
- bcm2711-rpi-cm4s.dtb
|
||||
+ bcm2711-rpi-cm4s.dtb \
|
||||
+ bcm2711-rpi-cm4-ha-yellow.dtb
|
||||
|
||||
dtb-$(CONFIG_ARCH_ALPINE) += \
|
||||
alpine-db.dtb
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
new file mode 100644
|
||||
index 000000000000..61d8c81d3de4
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -0,0 +1,598 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/dts-v1/;
|
||||
+#include "bcm2711.dtsi"
|
||||
+#include "bcm2711-rpi.dtsi"
|
||||
+//#include "bcm283x-rpi-usb-peripheral.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "raspberrypi,4-compute-module-ha-yellow", "raspberrypi,4-compute-module", "brcm,bcm2711";
|
||||
+ model = "Raspberry Pi Compute Module 4 on Home Assistant Yellow";
|
||||
+
|
||||
+ chosen {
|
||||
+ /* 8250 auxiliary UART instead of pl011 */
|
||||
+ stdout-path = "serial1:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ led-act {
|
||||
+ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ led-pwr {
|
||||
+ label = "PWR";
|
||||
+ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "keep";
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ sd_io_1v8_reg: sd_io_1v8_reg {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ regulator-name = "vdd-sd-io";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-settling-time-us = <5000>;
|
||||
+ gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
|
||||
+ states = <1800000 0x1>,
|
||||
+ <3300000 0x0>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ sd_vcc_reg: sd_vcc_reg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc-sd";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ddc0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ddc1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&expgpio {
|
||||
+ gpio-line-names = "BT_ON",
|
||||
+ "WL_ON",
|
||||
+ "PWR_LED_OFF",
|
||||
+ "ANT1",
|
||||
+ "VDD_SD_IO_SEL",
|
||||
+ "CAM_GPIO",
|
||||
+ "SD_PWR_ON",
|
||||
+ "ANT2";
|
||||
+
|
||||
+ ant1: ant1 {
|
||||
+ gpio-hog;
|
||||
+ gpios = <3 GPIO_ACTIVE_HIGH>;
|
||||
+ output-high;
|
||||
+ };
|
||||
+
|
||||
+ ant2: ant2 {
|
||||
+ gpio-hog;
|
||||
+ gpios = <7 GPIO_ACTIVE_HIGH>;
|
||||
+ output-low;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ /*
|
||||
+ * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
|
||||
+ * the official GPU firmware DT blob.
|
||||
+ *
|
||||
+ * Legend:
|
||||
+ * "FOO" = GPIO line named "FOO" on the schematic
|
||||
+ * "FOO_N" = GPIO line named "FOO" on schematic, active low
|
||||
+ */
|
||||
+ gpio-line-names = "ID_SDA",
|
||||
+ "ID_SCL",
|
||||
+ "SDA1",
|
||||
+ "SCL1",
|
||||
+ "GPIO_GCLK",
|
||||
+ "GPIO5",
|
||||
+ "GPIO6",
|
||||
+ "SPI_CE1_N",
|
||||
+ "SPI_CE0_N",
|
||||
+ "SPI_MISO",
|
||||
+ "SPI_MOSI",
|
||||
+ "SPI_SCLK",
|
||||
+ "GPIO12",
|
||||
+ "GPIO13",
|
||||
+ /* Serial port */
|
||||
+ "TXD1",
|
||||
+ "RXD1",
|
||||
+ "GPIO16",
|
||||
+ "GPIO17",
|
||||
+ "GPIO18",
|
||||
+ "GPIO19",
|
||||
+ "GPIO20",
|
||||
+ "GPIO21",
|
||||
+ "GPIO22",
|
||||
+ "GPIO23",
|
||||
+ "GPIO24",
|
||||
+ "GPIO25",
|
||||
+ "GPIO26",
|
||||
+ "GPIO27",
|
||||
+ "RGMII_MDIO",
|
||||
+ "RGMIO_MDC",
|
||||
+ /* Used by BT module */
|
||||
+ "CTS0",
|
||||
+ "RTS0",
|
||||
+ "TXD0",
|
||||
+ "RXD0",
|
||||
+ /* Used by Wifi */
|
||||
+ "SD1_CLK",
|
||||
+ "SD1_CMD",
|
||||
+ "SD1_DATA0",
|
||||
+ "SD1_DATA1",
|
||||
+ "SD1_DATA2",
|
||||
+ "SD1_DATA3",
|
||||
+ /* Shared with SPI flash */
|
||||
+ "PWM0_MISO",
|
||||
+ "PWM1_MOSI",
|
||||
+ "STATUS_LED_G_CLK",
|
||||
+ "SPIFLASH_CE_N",
|
||||
+ "SDA0",
|
||||
+ "SCL0",
|
||||
+ "RGMII_RXCLK",
|
||||
+ "RGMII_RXCTL",
|
||||
+ "RGMII_RXD0",
|
||||
+ "RGMII_RXD1",
|
||||
+ "RGMII_RXD2",
|
||||
+ "RGMII_RXD3",
|
||||
+ "RGMII_TXCLK",
|
||||
+ "RGMII_TXCTL",
|
||||
+ "RGMII_TXD0",
|
||||
+ "RGMII_TXD1",
|
||||
+ "RGMII_TXD2",
|
||||
+ "RGMII_TXD3";
|
||||
+};
|
||||
+
|
||||
+&hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pixelvalve0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pixelvalve1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pixelvalve2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pixelvalve4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* SDHCI is used to control the SDIO for wireless */
|
||||
+&sdhci {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_gpio34>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ brcmf: wifi@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* EMMC2 is used to drive the EMMC card */
|
||||
+&emmc2 {
|
||||
+ bus-width = <8>;
|
||||
+ vqmmc-supply = <&sd_io_1v8_reg>;
|
||||
+ vmmc-supply = <&sd_vcc_reg>;
|
||||
+ broken-cd;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&genet {
|
||||
+ phy-handle = <&phy1>;
|
||||
+ phy-mode = "rgmii-rxid";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&genet_mdio {
|
||||
+ phy1: ethernet-phy@0 {
|
||||
+ /* No PHY interrupt */
|
||||
+ reg = <0x0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ pci@0,0 {
|
||||
+ device-type = "pci";
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+
|
||||
+ reg = <0 0 0 0 0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* uart0 communicates with the BT module */
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
|
||||
+ uart-has-rtscts;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "brcm,bcm43438-bt";
|
||||
+ max-speed = <2000000>;
|
||||
+ shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* uart1 is mapped to the pin header */
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_gpio14>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vchiq {
|
||||
+ interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+};
|
||||
+
|
||||
+&vc4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vec {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+// =============================================
|
||||
+// Downstream rpi- changes
|
||||
+
|
||||
+#define BCM2711
|
||||
+
|
||||
+#include "bcm270x.dtsi"
|
||||
+#include "bcm271x-rpi-bt.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ soc {
|
||||
+ /delete-node/ pixelvalve@7e807000;
|
||||
+ /delete-node/ hdmi@7e902000;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+#include "bcm2711-rpi-ds.dtsi"
|
||||
+#include "bcm283x-rpi-csi0-2lane.dtsi"
|
||||
+#include "bcm283x-rpi-csi1-4lane.dtsi"
|
||||
+#include "bcm283x-rpi-i2c0mux_0_44.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
|
||||
+ };
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart1;
|
||||
+ serial1 = &uart0;
|
||||
+ mmc0 = &emmc2;
|
||||
+ mmc1 = &mmcnr;
|
||||
+ mmc2 = &sdhost;
|
||||
+ i2c3 = &i2c3;
|
||||
+ i2c4 = &i2c4;
|
||||
+ i2c5 = &i2c5;
|
||||
+ i2c6 = &i2c6;
|
||||
+ i2c20 = &ddc0;
|
||||
+ i2c21 = &ddc1;
|
||||
+ spi3 = &spi3;
|
||||
+ spi4 = &spi4;
|
||||
+ spi5 = &spi5;
|
||||
+ spi6 = &spi6;
|
||||
+ /delete-property/ intc;
|
||||
+ };
|
||||
+
|
||||
+ /delete-node/ wifi-pwrseq;
|
||||
+};
|
||||
+
|
||||
+&mmcnr {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio_pins>;
|
||||
+ bus-width = <4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-0 = <&uart0_pins &bt_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ pinctrl-0 = <&uart1_pins>;
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
|
||||
+ cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
|
||||
+
|
||||
+ spidev0: spidev@0{
|
||||
+ compatible = "spidev";
|
||||
+ reg = <0>; /* CE0 */
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ spi-max-frequency = <125000000>;
|
||||
+ };
|
||||
+
|
||||
+ spidev1: spidev@1{
|
||||
+ compatible = "spidev";
|
||||
+ reg = <1>; /* CE1 */
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ spi-max-frequency = <125000000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ spi0_pins: spi0_pins {
|
||||
+ brcm,pins = <9 10 11>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
+ };
|
||||
+
|
||||
+ spi0_cs_pins: spi0_cs_pins {
|
||||
+ brcm,pins = <8 7>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ spi3_pins: spi3_pins {
|
||||
+ brcm,pins = <1 2 3>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ };
|
||||
+
|
||||
+ spi3_cs_pins: spi3_cs_pins {
|
||||
+ brcm,pins = <0 24>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ spi4_pins: spi4_pins {
|
||||
+ brcm,pins = <5 6 7>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ };
|
||||
+
|
||||
+ spi4_cs_pins: spi4_cs_pins {
|
||||
+ brcm,pins = <4 25>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ spi5_pins: spi5_pins {
|
||||
+ brcm,pins = <13 14 15>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ };
|
||||
+
|
||||
+ spi5_cs_pins: spi5_cs_pins {
|
||||
+ brcm,pins = <12 26>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ spi6_pins: spi6_pins {
|
||||
+ brcm,pins = <19 20 21>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ };
|
||||
+
|
||||
+ spi6_cs_pins: spi6_cs_pins {
|
||||
+ brcm,pins = <18 27>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ i2c0_pins: i2c0 {
|
||||
+ brcm,pins = <0 1>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c1_pins: i2c1 {
|
||||
+ brcm,pins = <2 3>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c3_pins: i2c3 {
|
||||
+ brcm,pins = <4 5>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c4_pins: i2c4 {
|
||||
+ brcm,pins = <8 9>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c5_pins: i2c5 {
|
||||
+ brcm,pins = <12 13>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c6_pins: i2c6 {
|
||||
+ brcm,pins = <22 23>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2s_pins: i2s {
|
||||
+ brcm,pins = <18 19 20 21>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
+ };
|
||||
+
|
||||
+ sdio_pins: sdio_pins {
|
||||
+ brcm,pins = <34 35 36 37 38 39>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>; // alt3 = SD1
|
||||
+ brcm,pull = <0 2 2 2 2 2>;
|
||||
+ };
|
||||
+
|
||||
+ bt_pins: bt_pins {
|
||||
+ brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0
|
||||
+ // to fool pinctrl
|
||||
+ brcm,function = <0>;
|
||||
+ brcm,pull = <2>;
|
||||
+ };
|
||||
+
|
||||
+ uart0_pins: uart0_pins {
|
||||
+ brcm,pins = <32 33>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+
|
||||
+ uart1_pins: uart1_pins {
|
||||
+ brcm,pins;
|
||||
+ brcm,function;
|
||||
+ brcm,pull;
|
||||
+ };
|
||||
+
|
||||
+ uart2_pins: uart2_pins {
|
||||
+ brcm,pins = <0 1>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT4>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+
|
||||
+ uart3_pins: uart3_pins {
|
||||
+ brcm,pins = <4 5>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT4>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+
|
||||
+ uart4_pins: uart4_pins {
|
||||
+ brcm,pins = <8 9>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT4>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+
|
||||
+ uart5_pins: uart5_pins {
|
||||
+ brcm,pins = <12 13>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT4>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c0if {
|
||||
+ clock-frequency = <100000>;
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c1_pins>;
|
||||
+ clock-frequency = <100000>;
|
||||
+};
|
||||
+
|
||||
+&i2s {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2s_pins>;
|
||||
+};
|
||||
+
|
||||
+// =============================================
|
||||
+// Board specific stuff here
|
||||
+
|
||||
+&pcie0 {
|
||||
+ brcm,enable-l1ss;
|
||||
+};
|
||||
+
|
||||
+&sdhost {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&phy1 {
|
||||
+ led-modes = <0x00 0x08>; /* link/activity link */
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ audio_pins: audio_pins {
|
||||
+ brcm,pins = <>;
|
||||
+ brcm,function = <>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&leds {
|
||||
+ act_led: led-act {
|
||||
+ label = "led0";
|
||||
+ linux,default-trigger = "mmc0";
|
||||
+ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ pwr_led: led-pwr {
|
||||
+ label = "led1";
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&audio {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&audio_pins>;
|
||||
+ brcm,disable-headphones = <1>;
|
||||
+};
|
||||
+
|
||||
+cam0_reg: &cam1_reg {
|
||||
+ gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
||||
+
|
||||
+/ {
|
||||
+ __overrides__ {
|
||||
+ act_led_gpio = <&act_led>,"gpios:4";
|
||||
+ act_led_activelow = <&act_led>,"gpios:8";
|
||||
+ act_led_trigger = <&act_led>,"linux,default-trigger";
|
||||
+
|
||||
+ pwr_led_gpio = <&pwr_led>,"gpios:4";
|
||||
+ pwr_led_activelow = <&pwr_led>,"gpios:8";
|
||||
+ pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
|
||||
+
|
||||
+ eth_led0 = <&phy1>,"led-modes:0";
|
||||
+ eth_led1 = <&phy1>,"led-modes:4";
|
||||
+
|
||||
+ ant1 = <&ant1>,"output-high?=on",
|
||||
+ <&ant1>, "output-low?=off",
|
||||
+ <&ant2>, "output-high?=off",
|
||||
+ <&ant2>, "output-low?=on";
|
||||
+ ant2 = <&ant1>,"output-high?=off",
|
||||
+ <&ant1>, "output-low?=on",
|
||||
+ <&ant2>, "output-high?=on",
|
||||
+ <&ant2>, "output-low?=off";
|
||||
+ noant = <&ant1>,"output-high?=off",
|
||||
+ <&ant1>, "output-low?=on",
|
||||
+ <&ant2>, "output-high?=off",
|
||||
+ <&ant2>, "output-low?=on";
|
||||
+
|
||||
+ sd_poll_once = <&emmc2>, "non-removable?";
|
||||
+ spi_dma4 = <&spi0>, "dmas:0=", <&dma40>,
|
||||
+ <&spi0>, "dmas:8=", <&dma40>;
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
|
||||
index 9873335d0ed2..8c19b62e189e 100644
|
||||
--- a/arch/arm64/boot/dts/broadcom/Makefile
|
||||
+++ b/arch/arm64/boot/dts/broadcom/Makefile
|
||||
@@ -15,6 +15,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4s.dtb
|
||||
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4-ha-yellow.dtb
|
||||
|
||||
subdir-y += bcm4908
|
||||
subdir-y += northstar2
|
||||
diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
new file mode 100644
|
||||
index 000000000000..fdc5ec5bc956
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -0,0 +1 @@
|
||||
+#include "../../../../arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts"
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,656 @@
|
||||
From b28a8f5b591841f88f19cbf9850d713a602d912e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 11 Apr 2022 14:47:59 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: Add device tree for Home Assistant Yellow
|
||||
|
||||
Add device tree for Home Assistant Yellow, a Compute Module 4 based I/O
|
||||
board.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
.../boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 598 ++++++++++++++++++
|
||||
arch/arm64/boot/dts/broadcom/Makefile | 1 +
|
||||
.../broadcom/bcm2711-rpi-cm4-ha-yellow.dts | 1 +
|
||||
4 files changed, 602 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
|
||||
diff -ruN a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
--- a/arch/arm/boot/dts/Makefile 2023-02-09 15:33:00.362946319 -0000
|
||||
+++ b/arch/arm/boot/dts/Makefile 2023-02-09 15:35:14.619413829 -0000
|
||||
@@ -93,7 +93,8 @@
|
||||
bcm2711-rpi-400.dtb \
|
||||
bcm2711-rpi-4-b.dtb \
|
||||
bcm2835-rpi-zero.dtb \
|
||||
- bcm2835-rpi-zero-w.dtb
|
||||
+ bcm2835-rpi-zero-w.dtb \
|
||||
+ bcm2711-rpi-cm4-ha-yellow.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4708-asus-rt-ac56u.dtb \
|
||||
bcm4708-asus-rt-ac68u.dtb \
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
new file mode 100644
|
||||
index 000000000000..61d8c81d3de4
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -0,0 +1,598 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/dts-v1/;
|
||||
+#include "bcm2711.dtsi"
|
||||
+#include "bcm2711-rpi.dtsi"
|
||||
+//#include "bcm283x-rpi-usb-peripheral.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "raspberrypi,4-compute-module-ha-yellow", "raspberrypi,4-compute-module", "brcm,bcm2711";
|
||||
+ model = "Raspberry Pi Compute Module 4 on Home Assistant Yellow";
|
||||
+
|
||||
+ chosen {
|
||||
+ /* 8250 auxiliary UART instead of pl011 */
|
||||
+ stdout-path = "serial1:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ led-act {
|
||||
+ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ led-pwr {
|
||||
+ label = "PWR";
|
||||
+ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "keep";
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ sd_io_1v8_reg: sd_io_1v8_reg {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ regulator-name = "vdd-sd-io";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-settling-time-us = <5000>;
|
||||
+ gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
|
||||
+ states = <1800000 0x1>,
|
||||
+ <3300000 0x0>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ sd_vcc_reg: sd_vcc_reg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc-sd";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ddc0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ddc1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&expgpio {
|
||||
+ gpio-line-names = "BT_ON",
|
||||
+ "WL_ON",
|
||||
+ "PWR_LED_OFF",
|
||||
+ "ANT1",
|
||||
+ "VDD_SD_IO_SEL",
|
||||
+ "CAM_GPIO",
|
||||
+ "SD_PWR_ON",
|
||||
+ "ANT2";
|
||||
+
|
||||
+ ant1: ant1 {
|
||||
+ gpio-hog;
|
||||
+ gpios = <3 GPIO_ACTIVE_HIGH>;
|
||||
+ output-high;
|
||||
+ };
|
||||
+
|
||||
+ ant2: ant2 {
|
||||
+ gpio-hog;
|
||||
+ gpios = <7 GPIO_ACTIVE_HIGH>;
|
||||
+ output-low;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ /*
|
||||
+ * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
|
||||
+ * the official GPU firmware DT blob.
|
||||
+ *
|
||||
+ * Legend:
|
||||
+ * "FOO" = GPIO line named "FOO" on the schematic
|
||||
+ * "FOO_N" = GPIO line named "FOO" on schematic, active low
|
||||
+ */
|
||||
+ gpio-line-names = "ID_SDA",
|
||||
+ "ID_SCL",
|
||||
+ "SDA1",
|
||||
+ "SCL1",
|
||||
+ "GPIO_GCLK",
|
||||
+ "GPIO5",
|
||||
+ "GPIO6",
|
||||
+ "SPI_CE1_N",
|
||||
+ "SPI_CE0_N",
|
||||
+ "SPI_MISO",
|
||||
+ "SPI_MOSI",
|
||||
+ "SPI_SCLK",
|
||||
+ "GPIO12",
|
||||
+ "GPIO13",
|
||||
+ /* Serial port */
|
||||
+ "TXD1",
|
||||
+ "RXD1",
|
||||
+ "GPIO16",
|
||||
+ "GPIO17",
|
||||
+ "GPIO18",
|
||||
+ "GPIO19",
|
||||
+ "GPIO20",
|
||||
+ "GPIO21",
|
||||
+ "GPIO22",
|
||||
+ "GPIO23",
|
||||
+ "GPIO24",
|
||||
+ "GPIO25",
|
||||
+ "GPIO26",
|
||||
+ "GPIO27",
|
||||
+ "RGMII_MDIO",
|
||||
+ "RGMIO_MDC",
|
||||
+ /* Used by BT module */
|
||||
+ "CTS0",
|
||||
+ "RTS0",
|
||||
+ "TXD0",
|
||||
+ "RXD0",
|
||||
+ /* Used by Wifi */
|
||||
+ "SD1_CLK",
|
||||
+ "SD1_CMD",
|
||||
+ "SD1_DATA0",
|
||||
+ "SD1_DATA1",
|
||||
+ "SD1_DATA2",
|
||||
+ "SD1_DATA3",
|
||||
+ /* Shared with SPI flash */
|
||||
+ "PWM0_MISO",
|
||||
+ "PWM1_MOSI",
|
||||
+ "STATUS_LED_G_CLK",
|
||||
+ "SPIFLASH_CE_N",
|
||||
+ "SDA0",
|
||||
+ "SCL0",
|
||||
+ "RGMII_RXCLK",
|
||||
+ "RGMII_RXCTL",
|
||||
+ "RGMII_RXD0",
|
||||
+ "RGMII_RXD1",
|
||||
+ "RGMII_RXD2",
|
||||
+ "RGMII_RXD3",
|
||||
+ "RGMII_TXCLK",
|
||||
+ "RGMII_TXCTL",
|
||||
+ "RGMII_TXD0",
|
||||
+ "RGMII_TXD1",
|
||||
+ "RGMII_TXD2",
|
||||
+ "RGMII_TXD3";
|
||||
+};
|
||||
+
|
||||
+&hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pixelvalve0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pixelvalve1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pixelvalve2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pixelvalve4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* SDHCI is used to control the SDIO for wireless */
|
||||
+&sdhci {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_gpio34>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ brcmf: wifi@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* EMMC2 is used to drive the EMMC card */
|
||||
+&emmc2 {
|
||||
+ bus-width = <8>;
|
||||
+ vqmmc-supply = <&sd_io_1v8_reg>;
|
||||
+ vmmc-supply = <&sd_vcc_reg>;
|
||||
+ broken-cd;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&genet {
|
||||
+ phy-handle = <&phy1>;
|
||||
+ phy-mode = "rgmii-rxid";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&genet_mdio {
|
||||
+ phy1: ethernet-phy@0 {
|
||||
+ /* No PHY interrupt */
|
||||
+ reg = <0x0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ pci@0,0 {
|
||||
+ device-type = "pci";
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+
|
||||
+ reg = <0 0 0 0 0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* uart0 communicates with the BT module */
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
|
||||
+ uart-has-rtscts;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "brcm,bcm43438-bt";
|
||||
+ max-speed = <2000000>;
|
||||
+ shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* uart1 is mapped to the pin header */
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_gpio14>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vchiq {
|
||||
+ interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+};
|
||||
+
|
||||
+&vc4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vec {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+// =============================================
|
||||
+// Downstream rpi- changes
|
||||
+
|
||||
+#define BCM2711
|
||||
+
|
||||
+#include "bcm270x.dtsi"
|
||||
+#include "bcm271x-rpi-bt.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ soc {
|
||||
+ /delete-node/ pixelvalve@7e807000;
|
||||
+ /delete-node/ hdmi@7e902000;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+#include "bcm2711-rpi-ds.dtsi"
|
||||
+#include "bcm283x-rpi-csi0-2lane.dtsi"
|
||||
+#include "bcm283x-rpi-csi1-4lane.dtsi"
|
||||
+#include "bcm283x-rpi-i2c0mux_0_44.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
|
||||
+ };
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart1;
|
||||
+ serial1 = &uart0;
|
||||
+ mmc0 = &emmc2;
|
||||
+ mmc1 = &mmcnr;
|
||||
+ mmc2 = &sdhost;
|
||||
+ i2c3 = &i2c3;
|
||||
+ i2c4 = &i2c4;
|
||||
+ i2c5 = &i2c5;
|
||||
+ i2c6 = &i2c6;
|
||||
+ i2c20 = &ddc0;
|
||||
+ i2c21 = &ddc1;
|
||||
+ spi3 = &spi3;
|
||||
+ spi4 = &spi4;
|
||||
+ spi5 = &spi5;
|
||||
+ spi6 = &spi6;
|
||||
+ /delete-property/ intc;
|
||||
+ };
|
||||
+
|
||||
+ /delete-node/ wifi-pwrseq;
|
||||
+};
|
||||
+
|
||||
+&mmcnr {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio_pins>;
|
||||
+ bus-width = <4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-0 = <&uart0_pins &bt_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ pinctrl-0 = <&uart1_pins>;
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
|
||||
+ cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
|
||||
+
|
||||
+ spidev0: spidev@0{
|
||||
+ compatible = "spidev";
|
||||
+ reg = <0>; /* CE0 */
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ spi-max-frequency = <125000000>;
|
||||
+ };
|
||||
+
|
||||
+ spidev1: spidev@1{
|
||||
+ compatible = "spidev";
|
||||
+ reg = <1>; /* CE1 */
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ spi-max-frequency = <125000000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ spi0_pins: spi0_pins {
|
||||
+ brcm,pins = <9 10 11>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
+ };
|
||||
+
|
||||
+ spi0_cs_pins: spi0_cs_pins {
|
||||
+ brcm,pins = <8 7>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ spi3_pins: spi3_pins {
|
||||
+ brcm,pins = <1 2 3>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ };
|
||||
+
|
||||
+ spi3_cs_pins: spi3_cs_pins {
|
||||
+ brcm,pins = <0 24>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ spi4_pins: spi4_pins {
|
||||
+ brcm,pins = <5 6 7>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ };
|
||||
+
|
||||
+ spi4_cs_pins: spi4_cs_pins {
|
||||
+ brcm,pins = <4 25>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ spi5_pins: spi5_pins {
|
||||
+ brcm,pins = <13 14 15>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ };
|
||||
+
|
||||
+ spi5_cs_pins: spi5_cs_pins {
|
||||
+ brcm,pins = <12 26>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ spi6_pins: spi6_pins {
|
||||
+ brcm,pins = <19 20 21>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ };
|
||||
+
|
||||
+ spi6_cs_pins: spi6_cs_pins {
|
||||
+ brcm,pins = <18 27>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
|
||||
+ };
|
||||
+
|
||||
+ i2c0_pins: i2c0 {
|
||||
+ brcm,pins = <0 1>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c1_pins: i2c1 {
|
||||
+ brcm,pins = <2 3>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c3_pins: i2c3 {
|
||||
+ brcm,pins = <4 5>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c4_pins: i2c4 {
|
||||
+ brcm,pins = <8 9>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c5_pins: i2c5 {
|
||||
+ brcm,pins = <12 13>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2c6_pins: i2c6 {
|
||||
+ brcm,pins = <22 23>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
+ i2s_pins: i2s {
|
||||
+ brcm,pins = <18 19 20 21>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
+ };
|
||||
+
|
||||
+ sdio_pins: sdio_pins {
|
||||
+ brcm,pins = <34 35 36 37 38 39>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>; // alt3 = SD1
|
||||
+ brcm,pull = <0 2 2 2 2 2>;
|
||||
+ };
|
||||
+
|
||||
+ bt_pins: bt_pins {
|
||||
+ brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0
|
||||
+ // to fool pinctrl
|
||||
+ brcm,function = <0>;
|
||||
+ brcm,pull = <2>;
|
||||
+ };
|
||||
+
|
||||
+ uart0_pins: uart0_pins {
|
||||
+ brcm,pins = <32 33>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT3>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+
|
||||
+ uart1_pins: uart1_pins {
|
||||
+ brcm,pins;
|
||||
+ brcm,function;
|
||||
+ brcm,pull;
|
||||
+ };
|
||||
+
|
||||
+ uart2_pins: uart2_pins {
|
||||
+ brcm,pins = <0 1>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT4>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+
|
||||
+ uart3_pins: uart3_pins {
|
||||
+ brcm,pins = <4 5>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT4>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+
|
||||
+ uart4_pins: uart4_pins {
|
||||
+ brcm,pins = <8 9>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT4>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+
|
||||
+ uart5_pins: uart5_pins {
|
||||
+ brcm,pins = <12 13>;
|
||||
+ brcm,function = <BCM2835_FSEL_ALT4>;
|
||||
+ brcm,pull = <0 2>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c0if {
|
||||
+ clock-frequency = <100000>;
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c1_pins>;
|
||||
+ clock-frequency = <100000>;
|
||||
+};
|
||||
+
|
||||
+&i2s {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2s_pins>;
|
||||
+};
|
||||
+
|
||||
+// =============================================
|
||||
+// Board specific stuff here
|
||||
+
|
||||
+&pcie0 {
|
||||
+ brcm,enable-l1ss;
|
||||
+};
|
||||
+
|
||||
+&sdhost {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&phy1 {
|
||||
+ led-modes = <0x00 0x08>; /* link/activity link */
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ audio_pins: audio_pins {
|
||||
+ brcm,pins = <>;
|
||||
+ brcm,function = <>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&leds {
|
||||
+ act_led: led-act {
|
||||
+ label = "led0";
|
||||
+ linux,default-trigger = "mmc0";
|
||||
+ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ pwr_led: led-pwr {
|
||||
+ label = "led1";
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&audio {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&audio_pins>;
|
||||
+ brcm,disable-headphones = <1>;
|
||||
+};
|
||||
+
|
||||
+cam0_reg: &cam1_reg {
|
||||
+ gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
||||
+
|
||||
+/ {
|
||||
+ __overrides__ {
|
||||
+ act_led_gpio = <&act_led>,"gpios:4";
|
||||
+ act_led_activelow = <&act_led>,"gpios:8";
|
||||
+ act_led_trigger = <&act_led>,"linux,default-trigger";
|
||||
+
|
||||
+ pwr_led_gpio = <&pwr_led>,"gpios:4";
|
||||
+ pwr_led_activelow = <&pwr_led>,"gpios:8";
|
||||
+ pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
|
||||
+
|
||||
+ eth_led0 = <&phy1>,"led-modes:0";
|
||||
+ eth_led1 = <&phy1>,"led-modes:4";
|
||||
+
|
||||
+ ant1 = <&ant1>,"output-high?=on",
|
||||
+ <&ant1>, "output-low?=off",
|
||||
+ <&ant2>, "output-high?=off",
|
||||
+ <&ant2>, "output-low?=on";
|
||||
+ ant2 = <&ant1>,"output-high?=off",
|
||||
+ <&ant1>, "output-low?=on",
|
||||
+ <&ant2>, "output-high?=on",
|
||||
+ <&ant2>, "output-low?=off";
|
||||
+ noant = <&ant1>,"output-high?=off",
|
||||
+ <&ant1>, "output-low?=on",
|
||||
+ <&ant2>, "output-high?=off",
|
||||
+ <&ant2>, "output-low?=on";
|
||||
+
|
||||
+ sd_poll_once = <&emmc2>, "non-removable?";
|
||||
+ spi_dma4 = <&spi0>, "dmas:0=", <&dma40>,
|
||||
+ <&spi0>, "dmas:8=", <&dma40>;
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
new file mode 100644
|
||||
index 000000000000..fdc5ec5bc956
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -0,0 +1 @@
|
||||
+#include "../../../../arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts"
|
||||
--
|
||||
2.37.3
|
||||
diff -ruN a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
|
||||
--- a/arch/arm64/boot/dts/broadcom/Makefile 2023-02-09 16:15:32.939847341 -0000
|
||||
+++ b/arch/arm64/boot/dts/broadcom/Makefile 2023-02-09 16:16:03.899185742 -0000
|
||||
@@ -2,6 +2,7 @@
|
||||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
|
||||
bcm2711-rpi-4-b.dtb \
|
||||
bcm2711-rpi-cm4-io.dtb \
|
||||
+ bcm2711-rpi-cm4-ha-yellow.dtb \
|
||||
bcm2837-rpi-3-a-plus.dtb \
|
||||
bcm2837-rpi-3-b.dtb \
|
||||
bcm2837-rpi-3-b-plus.dtb \
|
||||
@@ -0,0 +1,74 @@
|
||||
From 2230740c7f74678ca80da55f74ccc24f5aa6bd35 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2230740c7f74678ca80da55f74ccc24f5aa6bd35.1614676528.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Tue, 2 Jun 2020 21:20:08 +0000
|
||||
Subject: [PATCH] ARM: dts: bcm283x: add compatible picked up by U-Boot
|
||||
|
||||
Without brcm,bcm2835-pl011 in compatible U-Boot uses the regular PL011
|
||||
driver which seems to crash when enable_uart=1 is not used. Using
|
||||
brcm,bcm2835-pl011 works around that and does not affect Linux since its
|
||||
not using that compatible string.
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711.dtsi | 8 ++++----
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 2 +-
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
|
||||
index b4bca5af95e1..c31b87b5bb3a 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2711.dtsi
|
||||
@@ -127,7 +127,7 @@ rng@7e104000 {
|
||||
};
|
||||
|
||||
uart2: serial@7e201400 {
|
||||
- compatible = "arm,pl011", "arm,primecell";
|
||||
+ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
|
||||
reg = <0x7e201400 0x200>;
|
||||
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
@@ -138,7 +138,7 @@ uart2: serial@7e201400 {
|
||||
};
|
||||
|
||||
uart3: serial@7e201600 {
|
||||
- compatible = "arm,pl011", "arm,primecell";
|
||||
+ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
|
||||
reg = <0x7e201600 0x200>;
|
||||
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
@@ -149,7 +149,7 @@ uart3: serial@7e201600 {
|
||||
};
|
||||
|
||||
uart4: serial@7e201800 {
|
||||
- compatible = "arm,pl011", "arm,primecell";
|
||||
+ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
|
||||
reg = <0x7e201800 0x200>;
|
||||
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
@@ -160,7 +160,7 @@ uart4: serial@7e201800 {
|
||||
};
|
||||
|
||||
uart5: serial@7e201a00 {
|
||||
- compatible = "arm,pl011", "arm,primecell";
|
||||
+ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
|
||||
reg = <0x7e201a00 0x200>;
|
||||
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
index 346838ee9d21..7f289fbca28c 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -300,7 +300,7 @@ uart1_ctsrts_gpio42: uart1_ctsrts_gpio42 {
|
||||
};
|
||||
|
||||
uart0: serial@7e201000 {
|
||||
- compatible = "arm,pl011", "arm,primecell";
|
||||
+ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
|
||||
reg = <0x7e201000 0x200>;
|
||||
interrupts = <2 25>;
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 7eb647452bb1a3294fae8edc5a323070adff922b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <7eb647452bb1a3294fae8edc5a323070adff922b.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 4 Mar 2021 14:33:09 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: Mux UART4 for SiLabs radio module
|
||||
|
||||
Enable UART4 by default and mux pins including hardware flow control.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 16 ++++++++++++++--
|
||||
1 file changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index 61d8c81d3de4..8db71876a78c 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -8,6 +8,10 @@ / {
|
||||
compatible = "raspberrypi,4-compute-module-ha-yellow", "raspberrypi,4-compute-module", "brcm,bcm2711";
|
||||
model = "Raspberry Pi Compute Module 4 on Home Assistant Yellow";
|
||||
|
||||
+ aliases {
|
||||
+ serial4 = &uart4;
|
||||
+ };
|
||||
+
|
||||
chosen {
|
||||
/* 8250 auxiliary UART instead of pl011 */
|
||||
stdout-path = "serial1:115200n8";
|
||||
@@ -261,6 +265,14 @@ &uart1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+/* uart4 for Zigbee */
|
||||
+&uart4 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart4_pins>;
|
||||
+ uart-has-rtscts;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&vchiq {
|
||||
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
@@ -488,9 +500,9 @@ uart3_pins: uart3_pins {
|
||||
};
|
||||
|
||||
uart4_pins: uart4_pins {
|
||||
- brcm,pins = <8 9>;
|
||||
+ brcm,pins = <8 9 10 11>;
|
||||
brcm,function = <BCM2835_FSEL_ALT4>;
|
||||
- brcm,pull = <0 2>;
|
||||
+ brcm,pull = <0 2 2 0>;
|
||||
};
|
||||
|
||||
uart5_pins: uart5_pins {
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From a7b86d8d0d81f841d8399a83f0f59f383d1556ed Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a7b86d8d0d81f841d8399a83f0f59f383d1556ed.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 4 Mar 2021 14:44:23 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: Mux debug UART5
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index 8db71876a78c..d1dea0a214a6 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -10,6 +10,7 @@ / {
|
||||
|
||||
aliases {
|
||||
serial4 = &uart4;
|
||||
+ serial5 = &uart5;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -273,6 +274,13 @@ &uart4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+/* uart5 default Debug UART */
|
||||
+&uart5 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart5_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&vchiq {
|
||||
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
@@ -308,6 +316,7 @@ soc {
|
||||
/ {
|
||||
chosen {
|
||||
bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
|
||||
+ stdout-path = "serial5:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 8ec364f50abcd9f5fa89f421a7ef8f70dfb2564a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8ec364f50abcd9f5fa89f421a7ef8f70dfb2564a.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 4 Mar 2021 14:48:48 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: Enable I2C6 by default
|
||||
|
||||
The main I2C bus used on Yellow is I2C6. Enable it by default.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index d1dea0a214a6..0bdbfdd44aed 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -531,6 +531,12 @@ &i2c1 {
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
|
||||
+&i2c6 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c6_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2s {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2s_pins>;
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From 50abc7980f8c575930cc4c928d356763742e81fb Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <50abc7980f8c575930cc4c928d356763742e81fb.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 4 Mar 2021 17:19:01 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: add I2S audio codec
|
||||
|
||||
Add TI PCM5122 I2S audio codec.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 26 +++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index 0bdbfdd44aed..f6f42bf45c92 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -535,11 +535,22 @@ &i2c6 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c6_pins>;
|
||||
status = "okay";
|
||||
+
|
||||
+ card_codec: pcm5121@4c {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "ti,pcm5121";
|
||||
+ reg = <0x4c>;
|
||||
+ AVDD-supply = <&vdd_3v3_reg>;
|
||||
+ DVDD-supply = <&vdd_3v3_reg>;
|
||||
+ CPVDD-supply = <&vdd_3v3_reg>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
};
|
||||
|
||||
&i2s {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2s_pins>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
// =============================================
|
||||
@@ -582,6 +593,21 @@ &pwm1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+&sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "pcm5121-sound";
|
||||
+ status = "okay";
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s>;
|
||||
+ };
|
||||
+
|
||||
+ dailink0_slave: simple-audio-card,codec {
|
||||
+ sound-dai = <&card_codec>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&audio {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&audio_pins>;
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
From 67751f4575c3837ada1bdec85184c77ea917b83a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <67751f4575c3837ada1bdec85184c77ea917b83a.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 9 Mar 2021 15:02:53 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: enable GPIO keys
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 31 +++++++++++++++++++
|
||||
1 file changed, 31 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index f6f42bf45c92..e2fa42a11cc9 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "bcm2711-rpi.dtsi"
|
||||
//#include "bcm283x-rpi-usb-peripheral.dtsi"
|
||||
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+
|
||||
/ {
|
||||
compatible = "raspberrypi,4-compute-module-ha-yellow", "raspberrypi,4-compute-module", "brcm,bcm2711";
|
||||
model = "Raspberry Pi Compute Module 4 on Home Assistant Yellow";
|
||||
@@ -18,6 +20,29 @@ chosen {
|
||||
stdout-path = "serial1:115200n8";
|
||||
};
|
||||
|
||||
+ keys: gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gpio_button_pins>;
|
||||
+
|
||||
+ status = "okay";
|
||||
+
|
||||
+ power {
|
||||
+ label = "Blue Button";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
|
||||
+ debounce-interval = <100>; // ms
|
||||
+ };
|
||||
+
|
||||
+ user {
|
||||
+ label = "Red Button";
|
||||
+ linux,code = <BTN_1>;
|
||||
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
|
||||
+ debounce-interval = <100>; // ms
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
led-act {
|
||||
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
|
||||
@@ -380,6 +405,12 @@ spidev1: spidev@1{
|
||||
};
|
||||
|
||||
&gpio {
|
||||
+ gpio_button_pins: gpio_button_pins {
|
||||
+ brcm,pins = <26 27>;
|
||||
+ brcm,function = <BCM2835_FSEL_GPIO_IN>;
|
||||
+ brcm,pull = <BCM2835_PUD_UP>;
|
||||
+ };
|
||||
+
|
||||
spi0_pins: spi0_pins {
|
||||
brcm,pins = <9 10 11>;
|
||||
brcm,function = <BCM2835_FSEL_ALT0>;
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From e4db609b1080e4aabb027394966c07e050e02aab Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e4db609b1080e4aabb027394966c07e050e02aab.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 28 Oct 2021 19:38:04 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: add user LED
|
||||
|
||||
Add yellow user LED.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index e2fa42a11cc9..6039c7894796 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -336,7 +336,6 @@ soc {
|
||||
#include "bcm2711-rpi-ds.dtsi"
|
||||
#include "bcm283x-rpi-csi0-2lane.dtsi"
|
||||
#include "bcm283x-rpi-csi1-4lane.dtsi"
|
||||
-#include "bcm283x-rpi-i2c0mux_0_44.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
@@ -618,6 +617,12 @@ pwr_led: led-pwr {
|
||||
linux,default-trigger = "default-on";
|
||||
gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
+
|
||||
+ user_led: led-user {
|
||||
+ label = "led2";
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 6625adc479a3e89873127a91064a94881449c0d8 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <6625adc479a3e89873127a91064a94881449c0d8.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 12 Nov 2021 17:33:32 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: add NXP PCF85063A RTC
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index 6039c7894796..f78428ea64f3 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -575,6 +575,11 @@ card_codec: pcm5121@4c {
|
||||
CPVDD-supply = <&vdd_3v3_reg>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+ pcf85063a: rtc@51 {
|
||||
+ compatible = "nxp,pcf85063a";
|
||||
+ reg = <0x51>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&i2s {
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 1acd279eca810707856e5038438f52d694a62170 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <1acd279eca810707856e5038438f52d694a62170.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Fri, 7 Jan 2022 17:10:00 +0100
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: enable USB host mode by default
|
||||
|
||||
The DWC2 controller is disable by default. Enable it since Home
|
||||
Assistant Yellow has a USB hub and USB ports connected to it.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index f78428ea64f3..711a09441ad0 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -599,6 +599,15 @@ &sdhost {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+&usb {
|
||||
+ compatible = "brcm,bcm2835-usb";
|
||||
+ dr_mode = "host";
|
||||
+ g-np-tx-fifo-size = <32>;
|
||||
+ g-rx-fifo-size = <558>;
|
||||
+ g-tx-fifo-size = <512 512 512 512 512 256 256>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&phy1 {
|
||||
led-modes = <0x00 0x08>; /* link/activity link */
|
||||
};
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 92332ba4302096777ea47e408f3406da0b2ef2c5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <92332ba4302096777ea47e408f3406da0b2ef2c5.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 27 Apr 2022 20:36:19 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: use generic activity trigger for
|
||||
green LED
|
||||
|
||||
Use the generic trigger "activity" for the green LED so that any
|
||||
system activity is shown.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index 711a09441ad0..f2f4f1a49592 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -622,7 +622,7 @@ audio_pins: audio_pins {
|
||||
&leds {
|
||||
act_led: led-act {
|
||||
label = "led0";
|
||||
- linux,default-trigger = "mmc0";
|
||||
+ linux,default-trigger = "activity";
|
||||
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 59e44006c1e7406bd1fc52aa9b1fc88a67652ddd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <59e44006c1e7406bd1fc52aa9b1fc88a67652ddd.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 26 Jul 2022 15:53:59 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: use USB OTG mode by default
|
||||
|
||||
OTG seems to work fine, and allows to use the USB-C port as a USB
|
||||
peripheral (e.g. in U-Boot via UMS command).
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index f2f4f1a49592..f354bfb69093 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -601,7 +601,7 @@ &sdhost {
|
||||
|
||||
&usb {
|
||||
compatible = "brcm,bcm2835-usb";
|
||||
- dr_mode = "host";
|
||||
+ dr_mode = "otg";
|
||||
g-np-tx-fifo-size = <32>;
|
||||
g-rx-fifo-size = <558>;
|
||||
g-tx-fifo-size = <512 512 512 512 512 256 256>;
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
From f69ef30ade36371215d02546d603143cc13adef2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f69ef30ade36371215d02546d603143cc13adef2.1662565903.git.stefan@agner.ch>
|
||||
In-Reply-To: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
References: <b28a8f5b591841f88f19cbf9850d713a602d912e.1662565903.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Sat, 30 Jul 2022 11:21:31 +0200
|
||||
Subject: [PATCH] ARM: dts: bcm2711: yellow: Add LED overrides
|
||||
|
||||
Add device tree overrides for all three LEDs.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 17 ++++++++++-------
|
||||
1 file changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
index f354bfb69093..2d272a02128b 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
|
||||
@@ -621,20 +621,24 @@ audio_pins: audio_pins {
|
||||
|
||||
&leds {
|
||||
act_led: led-act {
|
||||
- label = "led0";
|
||||
+ label = "act";
|
||||
linux,default-trigger = "activity";
|
||||
+ default-state = "off";
|
||||
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
pwr_led: led-pwr {
|
||||
- label = "led1";
|
||||
+ label = "pwr";
|
||||
linux,default-trigger = "default-on";
|
||||
+ default-state = "off";
|
||||
gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
- user_led: led-user {
|
||||
- label = "led2";
|
||||
+ usr_led: led-usr {
|
||||
+ label = "usr";
|
||||
linux,default-trigger = "heartbeat";
|
||||
+ default-state = "off";
|
||||
+ panic-indicator;
|
||||
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
@@ -670,14 +674,13 @@ cam0_reg: &cam1_reg {
|
||||
|
||||
/ {
|
||||
__overrides__ {
|
||||
- act_led_gpio = <&act_led>,"gpios:4";
|
||||
- act_led_activelow = <&act_led>,"gpios:8";
|
||||
act_led_trigger = <&act_led>,"linux,default-trigger";
|
||||
|
||||
- pwr_led_gpio = <&pwr_led>,"gpios:4";
|
||||
pwr_led_activelow = <&pwr_led>,"gpios:8";
|
||||
pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
|
||||
|
||||
+ usr_led_trigger = <&usr_led>,"linux,default-trigger";
|
||||
+
|
||||
eth_led0 = <&phy1>,"led-modes:0";
|
||||
eth_led1 = <&phy1>,"led-modes:4";
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
1
portage/target/etc/portage/env/app-backup/burp
vendored
Normal file
1
portage/target/etc/portage/env/app-backup/burp
vendored
Normal file
@@ -0,0 +1 @@
|
||||
fowners() { :; }
|
||||
1
portage/target/etc/portage/env/nobuildpkg
vendored
Normal file
1
portage/target/etc/portage/env/nobuildpkg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
FEATURES=-buildpkg
|
||||
1
portage/target/etc/portage/make.conf/10-common.conf
Normal file
1
portage/target/etc/portage/make.conf/10-common.conf
Normal file
@@ -0,0 +1 @@
|
||||
ACCEPT_KEYWORDS="${ARCH} ~${ARCH}"
|
||||
22
portage/target/etc/portage/make.conf/10-crossdev.conf
Normal file
22
portage/target/etc/portage/make.conf/10-crossdev.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
# Note: profile variables are set/overridden in profile/ files:
|
||||
# etc/portage/profile/use.force (overrides kernel_* USE variables)
|
||||
# etc/portage/profile/make.defaults (overrides ARCH, KERNEL, ELIBC variables)
|
||||
|
||||
CHOST=aarch64-unknown-linux-gnu
|
||||
CBUILD=x86_64-pc-linux-gnu
|
||||
|
||||
ROOT=/usr/${CHOST}/
|
||||
|
||||
ACCEPT_KEYWORDS="${ARCH} ~${ARCH}"
|
||||
|
||||
USE="${ARCH}"
|
||||
|
||||
CFLAGS="-O2 -pipe -fomit-frame-pointer"
|
||||
CXXFLAGS="${CFLAGS}"
|
||||
|
||||
FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc"
|
||||
# Be sure we dont overwrite pkgs from another repo..
|
||||
PORTAGE_TMPDIR=${ROOT}tmp/
|
||||
|
||||
PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/"
|
||||
#PORTDIR_OVERLAY="/var/db/repos/local/"
|
||||
2
portage/target/etc/portage/make.conf/20-binpkgs.conf
Normal file
2
portage/target/etc/portage/make.conf/20-binpkgs.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
FEATURES="${FEATURES} binpkg-multi-instance buildpkg"
|
||||
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg --binpkg-respect-use=y"
|
||||
1
portage/target/etc/portage/make.conf/30-default-use.conf
Normal file
1
portage/target/etc/portage/make.conf/30-default-use.conf
Normal file
@@ -0,0 +1 @@
|
||||
USE='-man -doc minimal pam zstd'
|
||||
2
portage/target/etc/portage/make.conf/40-goarch.conf
Normal file
2
portage/target/etc/portage/make.conf/40-goarch.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
GOOS=linux
|
||||
GOARCH=${ARCH}
|
||||
3
portage/target/etc/portage/make.conf/40-lang.conf
Normal file
3
portage/target/etc/portage/make.conf/40-lang.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
LINGUAS=en
|
||||
L10N=en-US
|
||||
USE="${USE} -nls"
|
||||
2
portage/target/etc/portage/make.conf/60-selinux.conf
Normal file
2
portage/target/etc/portage/make.conf/60-selinux.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
USE="${USE} -unconfined"
|
||||
POLICY_TYPES=mcs
|
||||
2
portage/target/etc/portage/make.conf/80-quiet.conf
Normal file
2
portage/target/etc/portage/make.conf/80-quiet.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --quiet-build=y"
|
||||
FEATURES="${FEATURES} -news"
|
||||
1
portage/target/etc/portage/make.profile
Symbolic link
1
portage/target/etc/portage/make.profile
Symbolic link
@@ -0,0 +1 @@
|
||||
/var/db/repos/gentoo/profiles/default/linux/arm64/17.0/systemd/selinux/merged-usr
|
||||
1
portage/target/etc/portage/package.accept_keywords/burp
Normal file
1
portage/target/etc/portage/package.accept_keywords/burp
Normal file
@@ -0,0 +1 @@
|
||||
app-backup/burp **
|
||||
1
portage/target/etc/portage/package.env/linux-firmware
Normal file
1
portage/target/etc/portage/package.env/linux-firmware
Normal file
@@ -0,0 +1 @@
|
||||
sys-kernel/linux-firmware nobuildpkg
|
||||
@@ -0,0 +1 @@
|
||||
sys-boot/raspberrypi-firmware nobuildpkg
|
||||
2
portage/target/etc/portage/package.license/firmware
Normal file
2
portage/target/etc/portage/package.license/firmware
Normal file
@@ -0,0 +1,2 @@
|
||||
sys-boot/raspberrypi-firmware raspberrypi-videocore-bin
|
||||
sys-kernel/linux-firmware linux-fw-redistributable
|
||||
1
portage/target/etc/portage/package.use/awk
Normal file
1
portage/target/etc/portage/package.use/awk
Normal file
@@ -0,0 +1 @@
|
||||
app-alternatives/awk -gawk busybox
|
||||
1
portage/target/etc/portage/package.use/busybox
Normal file
1
portage/target/etc/portage/package.use/busybox
Normal file
@@ -0,0 +1 @@
|
||||
sys-apps/busybox savedconfig
|
||||
1
portage/target/etc/portage/package.use/firmware
Normal file
1
portage/target/etc/portage/package.use/firmware
Normal file
@@ -0,0 +1 @@
|
||||
sys-kernel/linux-firmware compress compress-xz savedconfig
|
||||
1
portage/target/etc/portage/package.use/go
Normal file
1
portage/target/etc/portage/package.use/go
Normal file
@@ -0,0 +1 @@
|
||||
sys-devel/binutils gold
|
||||
1
portage/target/etc/portage/package.use/grub
Normal file
1
portage/target/etc/portage/package.use/grub
Normal file
@@ -0,0 +1 @@
|
||||
sys-boot/grub -* GRUB_PLATFORMS: -* efi-64
|
||||
1
portage/target/etc/portage/package.use/iptables
Normal file
1
portage/target/etc/portage/package.use/iptables
Normal file
@@ -0,0 +1 @@
|
||||
net-firewall/iptables conntrack nftables
|
||||
1
portage/target/etc/portage/package.use/python
Normal file
1
portage/target/etc/portage/package.use/python
Normal file
@@ -0,0 +1 @@
|
||||
dev-lang/python -ensurepip
|
||||
1
portage/target/etc/portage/package.use/u-boot
Normal file
1
portage/target/etc/portage/package.use/u-boot
Normal file
@@ -0,0 +1 @@
|
||||
sys-boot/u-boot savedconfig
|
||||
@@ -0,0 +1 @@
|
||||
selinux-base
|
||||
@@ -0,0 +1,40 @@
|
||||
From 057c4204fc49abd0d908c71aed8d33ea71d55862 Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Fri, 3 Mar 2023 15:04:28 -0600
|
||||
Subject: [PATCH] systemd: Fixes for systemd-resolved
|
||||
|
||||
---
|
||||
refpolicy/policy/modules/system/systemd.te | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/system/systemd.te b/refpolicy/policy/modules/system/systemd.te
|
||||
index 7cd50f1..a296a7d 100644
|
||||
--- a/refpolicy/policy/modules/system/systemd.te
|
||||
+++ b/refpolicy/policy/modules/system/systemd.te
|
||||
@@ -236,6 +236,7 @@ init_system_domain(systemd_resolved_t, systemd_resolved_exec_t)
|
||||
|
||||
type systemd_resolved_runtime_t alias systemd_resolved_var_run_t;
|
||||
files_runtime_file(systemd_resolved_runtime_t)
|
||||
+init_mountpoint(systemd_resolved_runtime_t)
|
||||
|
||||
type systemd_stdio_bridge_t;
|
||||
type systemd_stdio_bridge_exec_t;
|
||||
@@ -1500,6 +1501,7 @@ corenet_tcp_bind_llmnr_port(systemd_resolved_t)
|
||||
corenet_udp_bind_generic_node(systemd_resolved_t)
|
||||
corenet_udp_bind_dns_port(systemd_resolved_t)
|
||||
corenet_udp_bind_llmnr_port(systemd_resolved_t)
|
||||
+corenet_udp_bind_howl_port(systemd_resolved_t)
|
||||
|
||||
selinux_use_status_page(systemd_resolved_t)
|
||||
|
||||
@@ -1511,6 +1513,7 @@ files_list_runtime(systemd_resolved_t)
|
||||
|
||||
fs_getattr_all_fs(systemd_resolved_t)
|
||||
fs_search_cgroup_dirs(systemd_resolved_t)
|
||||
+fs_search_all(systemd_resolved_t)
|
||||
|
||||
init_dgram_send(systemd_resolved_t)
|
||||
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 2f9d6906d2b7bdb58bb83f13e476c7c6c1f8f6dd Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Sat, 4 Mar 2023 09:57:44 -0600
|
||||
Subject: [PATCH] mount: Allow mounting on etc_t
|
||||
|
||||
---
|
||||
refpolicy/policy/modules/system/mount.te | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/system/mount.te b/refpolicy/policy/modules/system/mount.te
|
||||
index a90273b..05da48a 100644
|
||||
--- a/refpolicy/policy/modules/system/mount.te
|
||||
+++ b/refpolicy/policy/modules/system/mount.te
|
||||
@@ -92,6 +92,7 @@ files_manage_etc_runtime_files(mount_t)
|
||||
files_etc_filetrans_etc_runtime(mount_t, file)
|
||||
files_mounton_all_mountpoints(mount_t)
|
||||
files_unmount_rootfs(mount_t)
|
||||
+files_mounton_etc_dirs(mount_t)
|
||||
# These rules need to be generalized. Only admin, initrc should have it:
|
||||
files_relabelto_all_file_type_fs(mount_t)
|
||||
files_mount_all_file_type_fs(mount_t)
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 555b08294fccf2c9462ef2e2f61ad1ae730becad Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Sat, 4 Mar 2023 10:16:13 -0600
|
||||
Subject: [PATCH] kernel: Mark unlabeled_t as mount point type
|
||||
|
||||
---
|
||||
refpolicy/policy/modules/kernel/kernel.te | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/kernel/kernel.te b/refpolicy/policy/modules/kernel/kernel.te
|
||||
index ae6222c..c24258f 100644
|
||||
--- a/refpolicy/policy/modules/kernel/kernel.te
|
||||
+++ b/refpolicy/policy/modules/kernel/kernel.te
|
||||
@@ -267,6 +267,7 @@ allow kernel_t sysctl_kernel_ns_last_pid_t:file read_file_perms;
|
||||
|
||||
# Other possible mount points for the root fs are in files
|
||||
allow kernel_t unlabeled_t:dir mounton;
|
||||
+files_mountpoint(unlabeled_t)
|
||||
# Kernel-generated traffic e.g., TCP resets on
|
||||
# connections with invalidated labels:
|
||||
allow kernel_t unlabeled_t:packet send;
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 5f86b48aabef6e2c1a7aa2fdb99a49b27d0629fe Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Mon, 6 Mar 2023 12:10:19 -0600
|
||||
Subject: [PATCH] Allow systemd-journald list cgroup directories
|
||||
|
||||
---
|
||||
refpolicy/policy/modules/system/logging.te | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/system/logging.te b/refpolicy/policy/modules/system/logging.te
|
||||
index 69b7aa4..196f3e0 100644
|
||||
--- a/refpolicy/policy/modules/system/logging.te
|
||||
+++ b/refpolicy/policy/modules/system/logging.te
|
||||
@@ -500,6 +500,7 @@ files_var_lib_filetrans(syslogd_t, syslogd_var_lib_t, { file dir })
|
||||
|
||||
fs_getattr_all_fs(syslogd_t)
|
||||
fs_search_auto_mountpoints(syslogd_t)
|
||||
+fs_list_cgroup_dirs(syslogd_t)
|
||||
|
||||
mls_file_write_all_levels(syslogd_t) # Need to be able to write to /var/run/ and /var/log directories
|
||||
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
From e33a70e7f5efc37b0b12fda775dd6d805ee5c0e1 Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Fri, 10 Mar 2023 12:39:41 -0600
|
||||
Subject: [PATCH] Allow systemd to create directories
|
||||
|
||||
This allows use of the `RuntimeDirectory`, `StateDirectory`, etc. unit
|
||||
settings.
|
||||
---
|
||||
refpolicy/policy/modules/kernel/files.if | 18 ++++++++++++++++++
|
||||
refpolicy/policy/modules/system/init.te | 14 ++++++++++++++
|
||||
2 files changed, 32 insertions(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/kernel/files.if b/refpolicy/policy/modules/kernel/files.if
|
||||
index a895f37..9ec28ce 100644
|
||||
--- a/refpolicy/policy/modules/kernel/files.if
|
||||
+++ b/refpolicy/policy/modules/kernel/files.if
|
||||
@@ -564,6 +564,24 @@ interface(`files_manage_non_security_dirs',`
|
||||
allow $1 non_security_file_type:dir manage_dir_perms;
|
||||
')
|
||||
|
||||
+########################################
|
||||
+## <summary>
|
||||
+## Allow attempts to setattr any directory
|
||||
+## </summary>
|
||||
+## <param name="domain">
|
||||
+## <summary>
|
||||
+## Domain allowed access.
|
||||
+## </summary>
|
||||
+## </param>
|
||||
+#
|
||||
+interface(`files_setattr_non_security_dirs',`
|
||||
+ gen_require(`
|
||||
+ attribute non_security_file_type;
|
||||
+ ')
|
||||
+
|
||||
+ allow $1 non_security_file_type:dir { read setattr };
|
||||
+')
|
||||
+
|
||||
########################################
|
||||
## <summary>
|
||||
## Create non-security directories.
|
||||
diff --git a/refpolicy/policy/modules/system/init.te b/refpolicy/policy/modules/system/init.te
|
||||
index 7249dd1..1ed2e45 100644
|
||||
--- a/refpolicy/policy/modules/system/init.te
|
||||
+++ b/refpolicy/policy/modules/system/init.te
|
||||
@@ -37,6 +37,13 @@ gen_tunable(init_daemons_use_tty, false)
|
||||
## </desc>
|
||||
gen_tunable(init_mounton_non_security, false)
|
||||
|
||||
+## <desc>
|
||||
+## <p>
|
||||
+## Enable init create, setattr, mounton on non_security_file_type
|
||||
+## </p>
|
||||
+## </desc>
|
||||
+gen_tunable(init_create_dirs, true)
|
||||
+
|
||||
attribute init_mountpoint_type;
|
||||
attribute init_path_unit_loc_type;
|
||||
attribute init_script_domain_type;
|
||||
@@ -620,6 +627,13 @@ ifdef(`init_systemd',`
|
||||
unconfined_create_keys(init_t)
|
||||
unconfined_write_keys(init_t)
|
||||
')
|
||||
+
|
||||
+ tunable_policy(`init_create_dirs',`
|
||||
+ files_create_non_security_dirs(init_t)
|
||||
+ files_mounton_non_security(init_t)
|
||||
+ files_setattr_non_security_dirs(init_t)
|
||||
+ ')
|
||||
+
|
||||
',`
|
||||
tunable_policy(`init_upstart',`
|
||||
corecmd_shell_domtrans(init_t, initrc_t)
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From bedc00b3dd5afaa8880f263bfa7c761b1445d204 Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Tue, 14 Mar 2023 13:40:23 -0500
|
||||
Subject: [PATCH] Allow init to setattr on char devices
|
||||
|
||||
This is required for local logins to work.
|
||||
---
|
||||
refpolicy/policy/modules/system/init.te | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/system/init.te b/refpolicy/policy/modules/system/init.te
|
||||
index 1ed2e45..6ef0e31 100644
|
||||
--- a/refpolicy/policy/modules/system/init.te
|
||||
+++ b/refpolicy/policy/modules/system/init.te
|
||||
@@ -390,6 +390,7 @@ ifdef(`init_systemd',`
|
||||
dev_create_urand_dev(init_t)
|
||||
# systemd writes to /dev/watchdog on shutdown
|
||||
dev_write_watchdog(init_t)
|
||||
+ dev_setattr_all_chr_files(init_t)
|
||||
|
||||
domain_read_all_domains_state(init_t)
|
||||
# for starting systemd --user in the right domain:
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From f497660743a219a6e54c2982529e5a57742e196a Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Thu, 23 Mar 2023 09:44:02 -0500
|
||||
Subject: [PATCH] podman: Allow crun to chown stdio sockets
|
||||
|
||||
Podman (actually `crun`) fails to launch containers as systemd units
|
||||
with this error:
|
||||
|
||||
fchown std stream 1: Permission denied
|
||||
|
||||
The error is caused by this AVC denial:
|
||||
|
||||
AVC avc: denied { setattr } for pid=262 comm="crun" name="UNIX-STREAM" dev="sockfs" ino=9811 scontext=system_u:system_r:podman_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=unix_stream_socket permissive=0
|
||||
---
|
||||
refpolicy/policy/modules/services/podman.te | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/services/podman.te b/refpolicy/policy/modules/services/podman.te
|
||||
index 3d16e64..d06e9f9 100644
|
||||
--- a/refpolicy/policy/modules/services/podman.te
|
||||
+++ b/refpolicy/policy/modules/services/podman.te
|
||||
@@ -71,6 +71,8 @@ ifdef(`init_systemd',`
|
||||
init_start_transient_units(podman_t)
|
||||
init_stop_transient_units(podman_t)
|
||||
|
||||
+ init_rw_stream_sockets(podman_t)
|
||||
+
|
||||
# podman can read logs from containers which are
|
||||
# sent to the system journal
|
||||
logging_search_logs(podman_t)
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 98c85f0633912a35b5d27417fa60ad213e843f97 Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Thu, 23 Mar 2023 10:45:11 -0500
|
||||
Subject: [PATCH] systemd: Allow quadlet to read container configs
|
||||
|
||||
---
|
||||
refpolicy/policy/modules/system/systemd.fc | 1 +
|
||||
refpolicy/policy/modules/system/systemd.te | 5 +++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/system/systemd.fc b/refpolicy/policy/modules/system/systemd.fc
|
||||
index f4b5fa0..9538432 100644
|
||||
--- a/refpolicy/policy/modules/system/systemd.fc
|
||||
+++ b/refpolicy/policy/modules/system/systemd.fc
|
||||
@@ -23,6 +23,7 @@
|
||||
/usr/lib/systemd/system-generators/.* -- gen_context(system_u:object_r:systemd_generator_exec_t,s0)
|
||||
/usr/lib/systemd/user-environment-generators/.* -- gen_context(system_u:object_r:systemd_generator_exec_t,s0)
|
||||
/usr/lib/systemd/user-generators/.* -- gen_context(system_u:object_r:systemd_generator_exec_t,s0)
|
||||
+/usr/libexec/podman/quadlet -- gen_context(system_u:object_r:systemd_generator_exec_t,s0)
|
||||
|
||||
/usr/lib/systemd/systemd-activate -- gen_context(system_u:object_r:systemd_activate_exec_t,s0)
|
||||
/usr/lib/systemd/systemd-backlight -- gen_context(system_u:object_r:systemd_backlight_exec_t,s0)
|
||||
diff --git a/refpolicy/policy/modules/system/systemd.te b/refpolicy/policy/modules/system/systemd.te
|
||||
index a296a7d..85157f8 100644
|
||||
--- a/refpolicy/policy/modules/system/systemd.te
|
||||
+++ b/refpolicy/policy/modules/system/systemd.te
|
||||
@@ -572,6 +572,11 @@ optional_policy(`
|
||||
zfs_read_config(systemd_generator_t)
|
||||
')
|
||||
|
||||
+optional_policy(`
|
||||
+ # needed by podman-system-generator
|
||||
+ container_read_config(systemd_generator_t)
|
||||
+')
|
||||
+
|
||||
#######################################
|
||||
#
|
||||
# systemd-homed policy
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From a13c332aed1cf9b54a3644c6d5cf1f9cd187b211 Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Sun, 26 Mar 2023 14:56:02 -0500
|
||||
Subject: [PATCH] container: Allow containers to use fd from init
|
||||
|
||||
Containers run as systemd units need to be able to use the file
|
||||
descriptors inherited from systemd for standard input/output/error.
|
||||
---
|
||||
refpolicy/policy/modules/services/container.te | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/services/container.te b/refpolicy/policy/modules/services/container.te
|
||||
index 534d6f4..d519177 100644
|
||||
--- a/refpolicy/policy/modules/services/container.te
|
||||
+++ b/refpolicy/policy/modules/services/container.te
|
||||
@@ -301,6 +301,8 @@ clock_read_adjtime(container_domain)
|
||||
|
||||
init_read_utmp(container_domain)
|
||||
init_dontaudit_write_utmp(container_domain)
|
||||
+init_use_fds(container_domain)
|
||||
+init_rw_stream_sockets(container_domain)
|
||||
|
||||
libs_dontaudit_setattr_lib_files(container_domain)
|
||||
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From a2cf7311a5d50c6585c63b6602e7841b23aacfdd Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Sun, 26 Mar 2023 14:56:02 -0500
|
||||
Subject: [PATCH] podman: Allow podman to use fd inherited from init
|
||||
|
||||
---
|
||||
refpolicy/policy/modules/services/podman.te | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/services/podman.te b/refpolicy/policy/modules/services/podman.te
|
||||
index d06e9f9..9ead6ba 100644
|
||||
--- a/refpolicy/policy/modules/services/podman.te
|
||||
+++ b/refpolicy/policy/modules/services/podman.te
|
||||
@@ -72,6 +72,7 @@ ifdef(`init_systemd',`
|
||||
init_stop_transient_units(podman_t)
|
||||
|
||||
init_rw_stream_sockets(podman_t)
|
||||
+ init_use_fds(podman_t)
|
||||
|
||||
# podman can read logs from containers which are
|
||||
# sent to the system journal
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 370eab5c843f4081aacfe67a1bd6c17bb1973902 Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Sun, 26 Mar 2023 14:59:28 -0500
|
||||
Subject: [PATCH] Allow podman to validate security contexts
|
||||
|
||||
Addresses this AVC denial:
|
||||
|
||||
avc: denied { write } for pid=244 comm="podman" name="context" dev="selinuxfs" ino=5 scontext=system_u:system_r:podman_t:s0 tcontext=system_u:object_r:security_t:s0 tclass=file permissive=0
|
||||
---
|
||||
refpolicy/policy/modules/services/podman.te | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/services/podman.te b/refpolicy/policy/modules/services/podman.te
|
||||
index d06e9f9..41e0ec6 100644
|
||||
--- a/refpolicy/policy/modules/services/podman.te
|
||||
+++ b/refpolicy/policy/modules/services/podman.te
|
||||
@@ -60,6 +60,8 @@ container_manage_sock_files(podman_t)
|
||||
|
||||
podman_spec_rangetrans_conmon(podman_t, s0)
|
||||
|
||||
+selinux_validate_context(podman_t)
|
||||
+
|
||||
ifdef(`init_systemd',`
|
||||
init_dbus_chat(podman_t)
|
||||
init_setsched(podman_t)
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 51414cb3a2dd02b79ce05842d49d5ff1ff67ef56 Mon Sep 17 00:00:00 2001
|
||||
From: "Dustin C. Hatch" <dustin@hatch.name>
|
||||
Date: Sun, 26 Mar 2023 15:03:40 -0500
|
||||
Subject: [PATCH] podman: Allow conmon to signal containers
|
||||
|
||||
Addresses these AVC denials:
|
||||
|
||||
avc: denied { kill } for pid=274 comm="conmon" capability=5 scontext=system_u:system_r:podman_conmon_t:s0 tcontext=system_u:system_r:podman_conmon_t:s0 tclass=capability permissive=0
|
||||
avc: denied { signal } for pid=278 comm="conmon" scontext=system_u:system_r:podman_conmon_t:s0 tcontext=system_u:system_r:container_t:s0:c273,c333 tclass=process permissive=0
|
||||
---
|
||||
refpolicy/policy/modules/services/podman.te | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/refpolicy/policy/modules/services/podman.te b/refpolicy/policy/modules/services/podman.te
|
||||
index 41e0ec6..222ae2b 100644
|
||||
--- a/refpolicy/policy/modules/services/podman.te
|
||||
+++ b/refpolicy/policy/modules/services/podman.te
|
||||
@@ -191,7 +191,7 @@ ifdef(`init_systemd',`
|
||||
# podman conmon local policy
|
||||
#
|
||||
|
||||
-allow podman_conmon_t self:capability { dac_override dac_read_search sys_ptrace sys_resource };
|
||||
+allow podman_conmon_t self:capability { dac_override dac_read_search kill sys_ptrace sys_resource };
|
||||
dontaudit podman_conmon_t self:capability net_admin;
|
||||
|
||||
podman_domtrans(podman_conmon_t)
|
||||
@@ -214,6 +214,8 @@ container_engine_tmp_filetrans(podman_conmon_t, { file sock_file })
|
||||
container_manage_engine_tmp_files(podman_conmon_t)
|
||||
container_manage_engine_tmp_sock_files(podman_conmon_t)
|
||||
|
||||
+container_signal_all_containers(podman_conmon_t)
|
||||
+
|
||||
ifdef(`init_systemd',`
|
||||
init_get_transient_units_status(podman_conmon_t)
|
||||
init_start_transient_units(podman_conmon_t)
|
||||
--
|
||||
2.39.0
|
||||
|
||||
1
portage/target/etc/portage/patches/sec-policy/selinux-container
Symbolic link
1
portage/target/etc/portage/patches/sec-policy/selinux-container
Symbolic link
@@ -0,0 +1 @@
|
||||
selinux-base
|
||||
1
portage/target/etc/portage/patches/sec-policy/selinux-podman
Symbolic link
1
portage/target/etc/portage/patches/sec-policy/selinux-podman
Symbolic link
@@ -0,0 +1 @@
|
||||
selinux-base
|
||||
1190
portage/target/etc/portage/savedconfig/sys-apps/busybox
Normal file
1190
portage/target/etc/portage/savedconfig/sys-apps/busybox
Normal file
File diff suppressed because it is too large
Load Diff
100
portage/target/etc/portage/savedconfig/sys-boot/u-boot
Normal file
100
portage/target/etc/portage/savedconfig/sys-boot/u-boot
Normal file
@@ -0,0 +1,100 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_BCM283X=y
|
||||
CONFIG_TEXT_BASE=0x00080000
|
||||
CONFIG_TARGET_RPI_4=y
|
||||
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x7fffe30
|
||||
CONFIG_ENV_SIZE=0x4000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b"
|
||||
CONFIG_SYS_PROMPT="U-Boot> "
|
||||
CONFIG_DM_RESET=y
|
||||
CONFIG_SYS_LOAD_ADDR=0x1000000
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_USE_PREBOOT=y
|
||||
CONFIG_PREBOOT="pci enum; usb start;"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_MISC_INIT_R=y
|
||||
CONFIG_FDT_SIMPLEFB=y
|
||||
CONFIG_SYS_PBSIZE=1049
|
||||
CONFIG_CMD_DFU=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_PCI=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_FS_UUID=y
|
||||
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_TFTP_TSIZE=y
|
||||
CONFIG_DM_DMA=y
|
||||
CONFIG_DFU_MMC=y
|
||||
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000
|
||||
CONFIG_SYS_DFU_MAX_FILE_SIZE=0x200000
|
||||
CONFIG_BCM2835_GPIO=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_BCM2835=y
|
||||
CONFIG_BCMGENET=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_BRCMSTB=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_GENERIC is not set
|
||||
CONFIG_DM_RNG=y
|
||||
CONFIG_RNG_IPROC200=y
|
||||
# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
|
||||
CONFIG_SYSINFO=y
|
||||
CONFIG_SYSINFO_SMBIOS=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB_GADGET=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_PCI=y
|
||||
CONFIG_USB_KEYBOARD=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_MANUFACTURER="FSL"
|
||||
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
|
||||
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
|
||||
CONFIG_USB_GADGET_DWC2_OTG=y
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
CONFIG_VIDEO=y
|
||||
# CONFIG_VIDEO_BPP8 is not set
|
||||
# CONFIG_VIDEO_BPP16 is not set
|
||||
CONFIG_SYS_WHITE_ON_BLACK=y
|
||||
CONFIG_VIDEO_BCM2835=y
|
||||
CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
CONFIG_PHYS_TO_BUS=y
|
||||
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_BOOTDELAY=-2
|
||||
# CONFIG_ISO_PARTITION is not set
|
||||
CONFIG_EFI_PARTITION=y
|
||||
CONFIG_FS_EXT4=y
|
||||
CONFIG_FS_FAT=y
|
||||
# CONFIG_ENV_IS_IN_FAT is not set
|
||||
# CONFIG_ENV_IS_IN_EXT4 is not set
|
||||
CONFIG_ENV_IS_NOWHERE=y
|
||||
CONFIG_CMD_SETEXPR=y
|
||||
CONFIG_CMD_FILEENV=y
|
||||
CONFIG_CMD_SQUASHFS=y
|
||||
CONFIG_LZO=y
|
||||
|
||||
# CONFIG_DOS_PARTITION is not set
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_FUNCTION_MASS_STORAGE=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
|
||||
CONFIG_USB_XHCI_BRCM=y
|
||||
|
||||
CONFIG_NVME_PCI=y
|
||||
CONFIG_CMD_NVME=y
|
||||
CONFIG_NVME=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
|
||||
CONFIG_CMD_BOOTEFI=y
|
||||
CONFIG_EFI_LOADER=y
|
||||
|
||||
CONFIG_LMB_MAX_REGIONS=16
|
||||
@@ -0,0 +1,13 @@
|
||||
brcm/brcmfmac43455-sdio.AW-CM256SM.txt
|
||||
brcm/brcmfmac43455-sdio.MINIX-NEO Z83-4.txt
|
||||
brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 4 Model B.txt
|
||||
brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi Compute Module 4.txt
|
||||
brcm/brcmfmac43455-sdio.acepc-t8.txt
|
||||
brcm/brcmfmac43455-sdio.beagle,am5729-beagleboneai.txt
|
||||
brcm/brcmfmac43455-sdio.bin
|
||||
brcm/brcmfmac43455-sdio.clm_blob
|
||||
brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt
|
||||
brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
|
||||
brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
|
||||
cypress/cyfmac43455-sdio.bin
|
||||
cypress/cyfmac43455-sdio.clm_blob
|
||||
Reference in New Issue
Block a user