Split repo: remove yellow configdir
Splitting the Home Assistant Yellow configuration out of this repository, leaving only generic Aimee OS build system and configuration.gentoo
parent
dd178aaaba
commit
c821ec1ec4
|
@ -1,3 +0,0 @@
|
|||
portage/*/etc/portage/make.profile
|
||||
portage/*/etc/portage/repos.conf
|
||||
portage/target/etc/portage/make.conf/10-crossdev.conf
|
|
@ -1 +0,0 @@
|
|||
sys-boot/grub
|
|
@ -1,62 +0,0 @@
|
|||
basename
|
||||
cat
|
||||
chcon
|
||||
cp
|
||||
dd
|
||||
df
|
||||
du
|
||||
echo
|
||||
env
|
||||
false
|
||||
free
|
||||
fsync
|
||||
fuser
|
||||
grep
|
||||
groups
|
||||
head
|
||||
id
|
||||
install
|
||||
ip
|
||||
kill
|
||||
less
|
||||
link
|
||||
ln
|
||||
ls
|
||||
lsof
|
||||
mkdir
|
||||
mkfifo
|
||||
mktemp
|
||||
mv
|
||||
nice
|
||||
nproc
|
||||
pgrep
|
||||
ping
|
||||
ping6
|
||||
pkill
|
||||
ppidof
|
||||
printf
|
||||
ps
|
||||
readahead
|
||||
readlink
|
||||
realpath
|
||||
rm
|
||||
rmdir
|
||||
sed
|
||||
seq
|
||||
sh
|
||||
sha1sum
|
||||
sha256sum
|
||||
sha3sum
|
||||
sha512sum
|
||||
sort
|
||||
stat
|
||||
stty
|
||||
sync
|
||||
tac
|
||||
tail
|
||||
tar
|
||||
tee
|
||||
truncate
|
||||
tty
|
||||
uname
|
||||
uptime
|
|
@ -1,5 +0,0 @@
|
|||
target=aarch64-unknown-linux-gnu
|
||||
profile=default/linux/arm64/17.0/systemd/selinux/merged-usr
|
||||
kernel_pkg=sys-kernel/raspberrypi-sources
|
||||
kernel_defconfig=bcm2835
|
||||
device_tree=broadcom/bcm2711-rpi-cm4-ha-yellow.dtb
|
|
@ -1,17 +0,0 @@
|
|||
arm_64bit=1
|
||||
|
||||
start_x=1
|
||||
|
||||
bootcode_delay=0
|
||||
boot_delay=0
|
||||
|
||||
gpu_mem=32
|
||||
|
||||
kernel=u-boot.bin
|
||||
|
||||
enable_uart=1
|
||||
dtoverlay=miniuart-bt
|
||||
|
||||
dtparam i2c_arm=on
|
||||
|
||||
device_tree=bcm2711-rpi-cm4-ha-yellow.dtb
|
|
@ -1,4 +0,0 @@
|
|||
acct-group/nginx
|
||||
acct-user/nginx
|
||||
app-backup/burp
|
||||
app-containers/podman
|
|
@ -1,2 +0,0 @@
|
|||
net-wireless/wireless-regdb
|
||||
sys-kernel/linux-firmware
|
|
@ -1,61 +0,0 @@
|
|||
CONFIG_BTRFS_FS=y
|
||||
|
||||
CONFIG_OVERLAY_FS=m
|
||||
|
||||
CONFIG_MISC_FILESYSTEMS=y
|
||||
CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_XATTR=y
|
||||
CONFIG_SQUASHFS_ZSTD=y
|
||||
|
||||
CONFIG_EFI=y
|
||||
CONFIG_EFI_STUB=y
|
||||
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIE_BRCMSTB=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
|
||||
CONFIG_FW_LOADER_COMPRESS=y
|
||||
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_CHARDEV=m
|
||||
CONFIG_I2C_MUX=m
|
||||
CONFIG_I2C_MUX_GPMUX=m
|
||||
CONFIG_I2C_MUX_PINCTRL=m
|
||||
CONFIG_I2C_BCM2708=m
|
||||
CONFIG_I2C_BCM2835=m
|
||||
CONFIG_I2C_BRCMSTB=m
|
||||
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_PCF85063=m
|
||||
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_DISK=y
|
||||
CONFIG_LEDS_TRIGGER_ACTIVITY=y
|
||||
|
||||
CONFIG_WLAN=y
|
||||
CONFIG_WLAN_VENDOR_BROADCOM=y
|
||||
CONFIG_CFG80211=m
|
||||
CONFIG_MAC80211=m
|
||||
CONFIG_BRCM_FMAC=m
|
||||
CONFIG_BT=m
|
||||
|
||||
# CONFIG_KSM is not set
|
||||
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_IPV6_SIT=m
|
||||
CONFIG_IPV6_SIT_6RD=m
|
||||
|
||||
# CONFIG_MEDIA_CEC_SUPPORT is not set
|
||||
# CONFIG_MEDIA_SUPPORT is not set
|
||||
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_SECURITY_NETWORK=y
|
||||
CONFIG_SECURITY_SELINUX=y
|
||||
CONFIG_DEFAULT_SECURITY_SELINUX=y
|
||||
# DEFAULT_SECURITY_DAC is not set
|
||||
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_BLK_CGROUP=y
|
|
@ -1,3 +0,0 @@
|
|||
d burp
|
||||
d mosquitto
|
||||
d nginx/ssl
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"default": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
],
|
||||
"transports": {
|
||||
"docker": {
|
||||
"registry.access.redhat.com": [
|
||||
{
|
||||
"type": "signedBy",
|
||||
"keyType": "GPGKeys",
|
||||
"keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
|
||||
}
|
||||
],
|
||||
"registry.redhat.io": [
|
||||
{
|
||||
"type": "signedBy",
|
||||
"keyType": "GPGKeys",
|
||||
"keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
|
||||
}
|
||||
]
|
||||
},
|
||||
"docker-daemon": {
|
||||
"": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
unqualified-search-registries = ['docker.io', 'quay.io', 'registry.fedoraproject.org']
|
|
@ -1,19 +0,0 @@
|
|||
[Unit]
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Container]
|
||||
Image=ghcr.io/home-assistant/yellow-homeassistant:stable
|
||||
Network=host
|
||||
Volume=/var/lib/homeassistant:/config:Z
|
||||
User=300
|
||||
Group=300
|
||||
ReadOnly=true
|
||||
VolatileTmp=yes
|
||||
|
||||
[Service]
|
||||
TimeoutStartSec=5min
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,19 +0,0 @@
|
|||
[Unit]
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Container]
|
||||
Image=docker.io/library/eclipse-mosquitto:latest
|
||||
Network=host
|
||||
Volume=/etc/mosquitto:/mosquitto/config:Z
|
||||
Volume=/var/lib/mosquitto:/mosquitto/data:Z
|
||||
Volume=/var/log/mosquitto:/mosquitto/log:Z
|
||||
User=301
|
||||
Group=301
|
||||
ReadOnly=true
|
||||
|
||||
[Service]
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,26 +0,0 @@
|
|||
# vim: set ft=systemd :
|
||||
[Unit]
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
Requires=gen-nginx-cert.service
|
||||
|
||||
[Container]
|
||||
Image=docker.io/library/nginx
|
||||
Network=host
|
||||
Volume=/etc/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
Volume=/etc/nginx/conf.d:/etc/nginx/conf.d:ro
|
||||
Volume=/etc/nginx/ssl:/etc/nginx/ssl:ro
|
||||
Volume=/dev/log:/dev/log
|
||||
User=82
|
||||
Group=82
|
||||
AddCapability=CAP_NET_BIND_SERVICE
|
||||
ReadOnly=true
|
||||
VolatileTmp=yes
|
||||
|
||||
[Service]
|
||||
ProtectSystem=full
|
||||
UMask=0077
|
||||
ExecReload=/usr/bin/podman exec systemd-%N nginx -s reload
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,19 +0,0 @@
|
|||
[Unit]
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Container]
|
||||
Image=docker.io/koenkk/zigbee2mqtt:latest
|
||||
Network=host
|
||||
Volume=/var/lib/zigbee2mqtt:/app/data:Z
|
||||
User=302
|
||||
Group=302
|
||||
ReadOnly=true
|
||||
|
||||
[Service]
|
||||
TimeoutStartSec=5min
|
||||
ProtectSystem=full
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,19 +0,0 @@
|
|||
[Unit]
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Container]
|
||||
Image=docker.io/zwavejs/zwavejs2mqtt:latest
|
||||
Network=host
|
||||
Volume=/var/lib/zwavejs:/usr/src/app/store:Z
|
||||
User=303
|
||||
Group=303
|
||||
ReadOnly=true
|
||||
|
||||
[Service]
|
||||
TimeoutStartSec=5min
|
||||
ProtectSystem=full
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,901 +0,0 @@
|
|||
# Config file for mosquitto
|
||||
#
|
||||
# See mosquitto.conf(5) for more information.
|
||||
#
|
||||
# Default values are shown, uncomment to change.
|
||||
#
|
||||
# Use the # character to indicate a comment, but only if it is the
|
||||
# very first character on the line.
|
||||
|
||||
# =================================================================
|
||||
# General configuration
|
||||
# =================================================================
|
||||
|
||||
# Use per listener security settings.
|
||||
#
|
||||
# It is recommended this option be set before any other options.
|
||||
#
|
||||
# If this option is set to true, then all authentication and access control
|
||||
# options are controlled on a per listener basis. The following options are
|
||||
# affected:
|
||||
#
|
||||
# acl_file
|
||||
# allow_anonymous
|
||||
# allow_zero_length_clientid
|
||||
# auto_id_prefix
|
||||
# password_file
|
||||
# plugin
|
||||
# plugin_opt_*
|
||||
# psk_file
|
||||
#
|
||||
# Note that if set to true, then a durable client (i.e. with clean session set
|
||||
# to false) that has disconnected will use the ACL settings defined for the
|
||||
# listener that it was most recently connected to.
|
||||
#
|
||||
# The default behaviour is for this to be set to false, which maintains the
|
||||
# setting behaviour from previous versions of mosquitto.
|
||||
#per_listener_settings false
|
||||
|
||||
|
||||
# This option controls whether a client is allowed to connect with a zero
|
||||
# length client id or not. This option only affects clients using MQTT v3.1.1
|
||||
# and later. If set to false, clients connecting with a zero length client id
|
||||
# are disconnected. If set to true, clients will be allocated a client id by
|
||||
# the broker. This means it is only useful for clients with clean session set
|
||||
# to true.
|
||||
#allow_zero_length_clientid true
|
||||
|
||||
# If allow_zero_length_clientid is true, this option allows you to set a prefix
|
||||
# to automatically generated client ids to aid visibility in logs.
|
||||
# Defaults to 'auto-'
|
||||
#auto_id_prefix auto-
|
||||
|
||||
# This option affects the scenario when a client subscribes to a topic that has
|
||||
# retained messages. It is possible that the client that published the retained
|
||||
# message to the topic had access at the time they published, but that access
|
||||
# has been subsequently removed. If check_retain_source is set to true, the
|
||||
# default, the source of a retained message will be checked for access rights
|
||||
# before it is republished. When set to false, no check will be made and the
|
||||
# retained message will always be published. This affects all listeners.
|
||||
#check_retain_source true
|
||||
|
||||
# QoS 1 and 2 messages will be allowed inflight per client until this limit
|
||||
# is exceeded. Defaults to 0. (No maximum)
|
||||
# See also max_inflight_messages
|
||||
#max_inflight_bytes 0
|
||||
|
||||
# The maximum number of QoS 1 and 2 messages currently inflight per
|
||||
# client.
|
||||
# This includes messages that are partway through handshakes and
|
||||
# those that are being retried. Defaults to 20. Set to 0 for no
|
||||
# maximum. Setting to 1 will guarantee in-order delivery of QoS 1
|
||||
# and 2 messages.
|
||||
#max_inflight_messages 20
|
||||
|
||||
# For MQTT v5 clients, it is possible to have the server send a "server
|
||||
# keepalive" value that will override the keepalive value set by the client.
|
||||
# This is intended to be used as a mechanism to say that the server will
|
||||
# disconnect the client earlier than it anticipated, and that the client should
|
||||
# use the new keepalive value. The max_keepalive option allows you to specify
|
||||
# that clients may only connect with keepalive less than or equal to this
|
||||
# value, otherwise they will be sent a server keepalive telling them to use
|
||||
# max_keepalive. This only applies to MQTT v5 clients. The default, and maximum
|
||||
# value allowable, is 65535.
|
||||
#
|
||||
# Set to 0 to allow clients to set keepalive = 0, which means no keepalive
|
||||
# checks are made and the client will never be disconnected by the broker if no
|
||||
# messages are received. You should be very sure this is the behaviour that you
|
||||
# want.
|
||||
#
|
||||
# For MQTT v3.1.1 and v3.1 clients, there is no mechanism to tell the client
|
||||
# what keepalive value they should use. If an MQTT v3.1.1 or v3.1 client
|
||||
# specifies a keepalive time greater than max_keepalive they will be sent a
|
||||
# CONNACK message with the "identifier rejected" reason code, and disconnected.
|
||||
#
|
||||
#max_keepalive 65535
|
||||
|
||||
# For MQTT v5 clients, it is possible to have the server send a "maximum packet
|
||||
# size" value that will instruct the client it will not accept MQTT packets
|
||||
# with size greater than max_packet_size bytes. This applies to the full MQTT
|
||||
# packet, not just the payload. Setting this option to a positive value will
|
||||
# set the maximum packet size to that number of bytes. If a client sends a
|
||||
# packet which is larger than this value, it will be disconnected. This applies
|
||||
# to all clients regardless of the protocol version they are using, but v3.1.1
|
||||
# and earlier clients will of course not have received the maximum packet size
|
||||
# information. Defaults to no limit. Setting below 20 bytes is forbidden
|
||||
# because it is likely to interfere with ordinary client operation, even with
|
||||
# very small payloads.
|
||||
#max_packet_size 0
|
||||
|
||||
# QoS 1 and 2 messages above those currently in-flight will be queued per
|
||||
# client until this limit is exceeded. Defaults to 0. (No maximum)
|
||||
# See also max_queued_messages.
|
||||
# If both max_queued_messages and max_queued_bytes are specified, packets will
|
||||
# be queued until the first limit is reached.
|
||||
#max_queued_bytes 0
|
||||
|
||||
# Set the maximum QoS supported. Clients publishing at a QoS higher than
|
||||
# specified here will be disconnected.
|
||||
#max_qos 2
|
||||
|
||||
# The maximum number of QoS 1 and 2 messages to hold in a queue per client
|
||||
# above those that are currently in-flight. Defaults to 1000. Set
|
||||
# to 0 for no maximum (not recommended).
|
||||
# See also queue_qos0_messages.
|
||||
# See also max_queued_bytes.
|
||||
#max_queued_messages 1000
|
||||
#
|
||||
# This option sets the maximum number of heap memory bytes that the broker will
|
||||
# allocate, and hence sets a hard limit on memory use by the broker. Memory
|
||||
# requests that exceed this value will be denied. The effect will vary
|
||||
# depending on what has been denied. If an incoming message is being processed,
|
||||
# then the message will be dropped and the publishing client will be
|
||||
# disconnected. If an outgoing message is being sent, then the individual
|
||||
# message will be dropped and the receiving client will be disconnected.
|
||||
# Defaults to no limit.
|
||||
#memory_limit 0
|
||||
|
||||
# This option sets the maximum publish payload size that the broker will allow.
|
||||
# Received messages that exceed this size will not be accepted by the broker.
|
||||
# The default value is 0, which means that all valid MQTT messages are
|
||||
# accepted. MQTT imposes a maximum payload size of 268435455 bytes.
|
||||
#message_size_limit 0
|
||||
|
||||
# This option allows persistent clients (those with clean session set to false)
|
||||
# to be removed if they do not reconnect within a certain time frame.
|
||||
#
|
||||
# This is a non-standard option in MQTT V3.1 but allowed in MQTT v3.1.1.
|
||||
#
|
||||
# Badly designed clients may set clean session to false whilst using a randomly
|
||||
# generated client id. This leads to persistent clients that will never
|
||||
# reconnect. This option allows these clients to be removed.
|
||||
#
|
||||
# The expiration period should be an integer followed by one of h d w m y for
|
||||
# hour, day, week, month and year respectively. For example
|
||||
#
|
||||
# persistent_client_expiration 2m
|
||||
# persistent_client_expiration 14d
|
||||
# persistent_client_expiration 1y
|
||||
#
|
||||
# The default if not set is to never expire persistent clients.
|
||||
#persistent_client_expiration
|
||||
|
||||
# Write process id to a file. Default is a blank string which means
|
||||
# a pid file shouldn't be written.
|
||||
# This should be set to /var/run/mosquitto/mosquitto.pid if mosquitto is
|
||||
# being run automatically on boot with an init script and
|
||||
# start-stop-daemon or similar.
|
||||
#pid_file
|
||||
|
||||
# Set to true to queue messages with QoS 0 when a persistent client is
|
||||
# disconnected. These messages are included in the limit imposed by
|
||||
# max_queued_messages and max_queued_bytes
|
||||
# Defaults to false.
|
||||
# This is a non-standard option for the MQTT v3.1 spec but is allowed in
|
||||
# v3.1.1.
|
||||
#queue_qos0_messages false
|
||||
|
||||
# Set to false to disable retained message support. If a client publishes a
|
||||
# message with the retain bit set, it will be disconnected if this is set to
|
||||
# false.
|
||||
#retain_available true
|
||||
|
||||
# Disable Nagle's algorithm on client sockets. This has the effect of reducing
|
||||
# latency of individual messages at the potential cost of increasing the number
|
||||
# of packets being sent.
|
||||
#set_tcp_nodelay false
|
||||
|
||||
# Time in seconds between updates of the $SYS tree.
|
||||
# Set to 0 to disable the publishing of the $SYS tree.
|
||||
#sys_interval 10
|
||||
|
||||
# The MQTT specification requires that the QoS of a message delivered to a
|
||||
# subscriber is never upgraded to match the QoS of the subscription. Enabling
|
||||
# this option changes this behaviour. If upgrade_outgoing_qos is set true,
|
||||
# messages sent to a subscriber will always match the QoS of its subscription.
|
||||
# This is a non-standard option explicitly disallowed by the spec.
|
||||
#upgrade_outgoing_qos false
|
||||
|
||||
# When run as root, drop privileges to this user and its primary
|
||||
# group.
|
||||
# Set to root to stay as root, but this is not recommended.
|
||||
# If set to "mosquitto", or left unset, and the "mosquitto" user does not exist
|
||||
# then it will drop privileges to the "nobody" user instead.
|
||||
# If run as a non-root user, this setting has no effect.
|
||||
# Note that on Windows this has no effect and so mosquitto should be started by
|
||||
# the user you wish it to run as.
|
||||
#user mosquitto
|
||||
|
||||
# =================================================================
|
||||
# Listeners
|
||||
# =================================================================
|
||||
|
||||
# Listen on a port/ip address combination. By using this variable
|
||||
# multiple times, mosquitto can listen on more than one port. If
|
||||
# this variable is used and neither bind_address nor port given,
|
||||
# then the default listener will not be started.
|
||||
# The port number to listen on must be given. Optionally, an ip
|
||||
# address or host name may be supplied as a second argument. In
|
||||
# this case, mosquitto will attempt to bind the listener to that
|
||||
# address and so restrict access to the associated network and
|
||||
# interface. By default, mosquitto will listen on all interfaces.
|
||||
# Note that for a websockets listener it is not possible to bind to a host
|
||||
# name.
|
||||
#
|
||||
# On systems that support Unix Domain Sockets, it is also possible
|
||||
# to create a # Unix socket rather than opening a TCP socket. In
|
||||
# this case, the port number should be set to 0 and a unix socket
|
||||
# path must be provided, e.g.
|
||||
# listener 0 /tmp/mosquitto.sock
|
||||
#
|
||||
# listener port-number [ip address/host name/unix socket path]
|
||||
#listener
|
||||
|
||||
# By default, a listener will attempt to listen on all supported IP protocol
|
||||
# versions. If you do not have an IPv4 or IPv6 interface you may wish to
|
||||
# disable support for either of those protocol versions. In particular, note
|
||||
# that due to the limitations of the websockets library, it will only ever
|
||||
# attempt to open IPv6 sockets if IPv6 support is compiled in, and so will fail
|
||||
# if IPv6 is not available.
|
||||
#
|
||||
# Set to `ipv4` to force the listener to only use IPv4, or set to `ipv6` to
|
||||
# force the listener to only use IPv6. If you want support for both IPv4 and
|
||||
# IPv6, then do not use the socket_domain option.
|
||||
#
|
||||
#socket_domain
|
||||
|
||||
# Bind the listener to a specific interface. This is similar to
|
||||
# the [ip address/host name] part of the listener definition, but is useful
|
||||
# when an interface has multiple addresses or the address may change. If used
|
||||
# with the [ip address/host name] part of the listener definition, then the
|
||||
# bind_interface option will take priority.
|
||||
# Not available on Windows.
|
||||
#
|
||||
# Example: bind_interface eth0
|
||||
#bind_interface
|
||||
|
||||
# When a listener is using the websockets protocol, it is possible to serve
|
||||
# http data as well. Set http_dir to a directory which contains the files you
|
||||
# wish to serve. If this option is not specified, then no normal http
|
||||
# connections will be possible.
|
||||
#http_dir
|
||||
|
||||
# The maximum number of client connections to allow. This is
|
||||
# a per listener setting.
|
||||
# Default is -1, which means unlimited connections.
|
||||
# Note that other process limits mean that unlimited connections
|
||||
# are not really possible. Typically the default maximum number of
|
||||
# connections possible is around 1024.
|
||||
#max_connections -1
|
||||
|
||||
# The listener can be restricted to operating within a topic hierarchy using
|
||||
# the mount_point option. This is achieved be prefixing the mount_point string
|
||||
# to all topics for any clients connected to this listener. This prefixing only
|
||||
# happens internally to the broker; the client will not see the prefix.
|
||||
#mount_point
|
||||
|
||||
# Choose the protocol to use when listening.
|
||||
# This can be either mqtt or websockets.
|
||||
# Certificate based TLS may be used with websockets, except that only the
|
||||
# cafile, certfile, keyfile, ciphers, and ciphers_tls13 options are supported.
|
||||
#protocol mqtt
|
||||
|
||||
# Set use_username_as_clientid to true to replace the clientid that a client
|
||||
# connected with with its username. This allows authentication to be tied to
|
||||
# the clientid, which means that it is possible to prevent one client
|
||||
# disconnecting another by using the same clientid.
|
||||
# If a client connects with no username it will be disconnected as not
|
||||
# authorised when this option is set to true.
|
||||
# Do not use in conjunction with clientid_prefixes.
|
||||
# See also use_identity_as_username.
|
||||
#use_username_as_clientid
|
||||
|
||||
# Change the websockets headers size. This is a global option, it is not
|
||||
# possible to set per listener. This option sets the size of the buffer used in
|
||||
# the libwebsockets library when reading HTTP headers. If you are passing large
|
||||
# header data such as cookies then you may need to increase this value. If left
|
||||
# unset, or set to 0, then the default of 1024 bytes will be used.
|
||||
#websockets_headers_size
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Certificate based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# The following options can be used to enable certificate based SSL/TLS support
|
||||
# for this listener. Note that the recommended port for MQTT over TLS is 8883,
|
||||
# but this must be set manually.
|
||||
#
|
||||
# See also the mosquitto-tls man page and the "Pre-shared-key based SSL/TLS
|
||||
# support" section. Only one of certificate or PSK encryption support can be
|
||||
# enabled for any listener.
|
||||
|
||||
# Both of certfile and keyfile must be defined to enable certificate based
|
||||
# TLS encryption.
|
||||
|
||||
# Path to the PEM encoded server certificate.
|
||||
#certfile
|
||||
|
||||
# Path to the PEM encoded keyfile.
|
||||
#keyfile
|
||||
|
||||
# If you wish to control which encryption ciphers are used, use the ciphers
|
||||
# option. The list of available ciphers can be optained using the "openssl
|
||||
# ciphers" command and should be provided in the same format as the output of
|
||||
# that command. This applies to TLS 1.2 and earlier versions only. Use
|
||||
# ciphers_tls1.3 for TLS v1.3.
|
||||
#ciphers
|
||||
|
||||
# Choose which TLS v1.3 ciphersuites are used for this listener.
|
||||
# Defaults to "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
|
||||
#ciphers_tls1.3
|
||||
|
||||
# If you have require_certificate set to true, you can create a certificate
|
||||
# revocation list file to revoke access to particular client certificates. If
|
||||
# you have done this, use crlfile to point to the PEM encoded revocation file.
|
||||
#crlfile
|
||||
|
||||
# To allow the use of ephemeral DH key exchange, which provides forward
|
||||
# security, the listener must load DH parameters. This can be specified with
|
||||
# the dhparamfile option. The dhparamfile can be generated with the command
|
||||
# e.g. "openssl dhparam -out dhparam.pem 2048"
|
||||
#dhparamfile
|
||||
|
||||
# By default an TLS enabled listener will operate in a similar fashion to a
|
||||
# https enabled web server, in that the server has a certificate signed by a CA
|
||||
# and the client will verify that it is a trusted certificate. The overall aim
|
||||
# is encryption of the network traffic. By setting require_certificate to true,
|
||||
# the client must provide a valid certificate in order for the network
|
||||
# connection to proceed. This allows access to the broker to be controlled
|
||||
# outside of the mechanisms provided by MQTT.
|
||||
#require_certificate false
|
||||
|
||||
# cafile and capath define methods of accessing the PEM encoded
|
||||
# Certificate Authority certificates that will be considered trusted when
|
||||
# checking incoming client certificates.
|
||||
# cafile defines the path to a file containing the CA certificates.
|
||||
# capath defines a directory that will be searched for files
|
||||
# containing the CA certificates. For capath to work correctly, the
|
||||
# certificate files must have ".crt" as the file ending and you must run
|
||||
# "openssl rehash <path to capath>" each time you add/remove a certificate.
|
||||
#cafile
|
||||
#capath
|
||||
|
||||
|
||||
# If require_certificate is true, you may set use_identity_as_username to true
|
||||
# to use the CN value from the client certificate as a username. If this is
|
||||
# true, the password_file option will not be used for this listener.
|
||||
#use_identity_as_username false
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Pre-shared-key based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# The following options can be used to enable PSK based SSL/TLS support for
|
||||
# this listener. Note that the recommended port for MQTT over TLS is 8883, but
|
||||
# this must be set manually.
|
||||
#
|
||||
# See also the mosquitto-tls man page and the "Certificate based SSL/TLS
|
||||
# support" section. Only one of certificate or PSK encryption support can be
|
||||
# enabled for any listener.
|
||||
|
||||
# The psk_hint option enables pre-shared-key support for this listener and also
|
||||
# acts as an identifier for this listener. The hint is sent to clients and may
|
||||
# be used locally to aid authentication. The hint is a free form string that
|
||||
# doesn't have much meaning in itself, so feel free to be creative.
|
||||
# If this option is provided, see psk_file to define the pre-shared keys to be
|
||||
# used or create a security plugin to handle them.
|
||||
#psk_hint
|
||||
|
||||
# When using PSK, the encryption ciphers used will be chosen from the list of
|
||||
# available PSK ciphers. If you want to control which ciphers are available,
|
||||
# use the "ciphers" option. The list of available ciphers can be optained
|
||||
# using the "openssl ciphers" command and should be provided in the same format
|
||||
# as the output of that command.
|
||||
#ciphers
|
||||
|
||||
# Set use_identity_as_username to have the psk identity sent by the client used
|
||||
# as its username. Authentication will be carried out using the PSK rather than
|
||||
# the MQTT username/password and so password_file will not be used for this
|
||||
# listener.
|
||||
#use_identity_as_username false
|
||||
|
||||
|
||||
# =================================================================
|
||||
# Persistence
|
||||
# =================================================================
|
||||
|
||||
# If persistence is enabled, save the in-memory database to disk
|
||||
# every autosave_interval seconds. If set to 0, the persistence
|
||||
# database will only be written when mosquitto exits. See also
|
||||
# autosave_on_changes.
|
||||
# Note that writing of the persistence database can be forced by
|
||||
# sending mosquitto a SIGUSR1 signal.
|
||||
#autosave_interval 1800
|
||||
|
||||
# If true, mosquitto will count the number of subscription changes, retained
|
||||
# messages received and queued messages and if the total exceeds
|
||||
# autosave_interval then the in-memory database will be saved to disk.
|
||||
# If false, mosquitto will save the in-memory database to disk by treating
|
||||
# autosave_interval as a time in seconds.
|
||||
#autosave_on_changes false
|
||||
|
||||
# Save persistent message data to disk (true/false).
|
||||
# This saves information about all messages, including
|
||||
# subscriptions, currently in-flight messages and retained
|
||||
# messages.
|
||||
# retained_persistence is a synonym for this option.
|
||||
#persistence false
|
||||
|
||||
# The filename to use for the persistent database, not including
|
||||
# the path.
|
||||
#persistence_file mosquitto.db
|
||||
|
||||
# Location for persistent database.
|
||||
# Default is an empty string (current directory).
|
||||
# Set to e.g. /var/lib/mosquitto if running as a proper service on Linux or
|
||||
# similar.
|
||||
#persistence_location
|
||||
|
||||
|
||||
# =================================================================
|
||||
# Logging
|
||||
# =================================================================
|
||||
|
||||
# Places to log to. Use multiple log_dest lines for multiple
|
||||
# logging destinations.
|
||||
# Possible destinations are: stdout stderr syslog topic file dlt
|
||||
#
|
||||
# stdout and stderr log to the console on the named output.
|
||||
#
|
||||
# syslog uses the userspace syslog facility which usually ends up
|
||||
# in /var/log/messages or similar.
|
||||
#
|
||||
# topic logs to the broker topic '$SYS/broker/log/<severity>',
|
||||
# where severity is one of D, E, W, N, I, M which are debug, error,
|
||||
# warning, notice, information and message. Message type severity is used by
|
||||
# the subscribe/unsubscribe log_types and publishes log messages to
|
||||
# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe.
|
||||
#
|
||||
# The file destination requires an additional parameter which is the file to be
|
||||
# logged to, e.g. "log_dest file /var/log/mosquitto.log". The file will be
|
||||
# closed and reopened when the broker receives a HUP signal. Only a single file
|
||||
# destination may be configured.
|
||||
#
|
||||
# The dlt destination is for the automotive `Diagnostic Log and Trace` tool.
|
||||
# This requires that Mosquitto has been compiled with DLT support.
|
||||
#
|
||||
# Note that if the broker is running as a Windows service it will default to
|
||||
# "log_dest none" and neither stdout nor stderr logging is available.
|
||||
# Use "log_dest none" if you wish to disable logging.
|
||||
#log_dest stderr
|
||||
|
||||
# Types of messages to log. Use multiple log_type lines for logging
|
||||
# multiple types of messages.
|
||||
# Possible types are: debug, error, warning, notice, information,
|
||||
# none, subscribe, unsubscribe, websockets, all.
|
||||
# Note that debug type messages are for decoding the incoming/outgoing
|
||||
# network packets. They are not logged in "topics".
|
||||
#log_type error
|
||||
#log_type warning
|
||||
#log_type notice
|
||||
#log_type information
|
||||
|
||||
|
||||
# If set to true, client connection and disconnection messages will be included
|
||||
# in the log.
|
||||
#connection_messages true
|
||||
|
||||
# If using syslog logging (not on Windows), messages will be logged to the
|
||||
# "daemon" facility by default. Use the log_facility option to choose which of
|
||||
# local0 to local7 to log to instead. The option value should be an integer
|
||||
# value, e.g. "log_facility 5" to use local5.
|
||||
#log_facility
|
||||
|
||||
# If set to true, add a timestamp value to each log message.
|
||||
#log_timestamp true
|
||||
|
||||
# Set the format of the log timestamp. If left unset, this is the number of
|
||||
# seconds since the Unix epoch.
|
||||
# This is a free text string which will be passed to the strftime function. To
|
||||
# get an ISO 8601 datetime, for example:
|
||||
# log_timestamp_format %Y-%m-%dT%H:%M:%S
|
||||
#log_timestamp_format
|
||||
|
||||
# Change the websockets logging level. This is a global option, it is not
|
||||
# possible to set per listener. This is an integer that is interpreted by
|
||||
# libwebsockets as a bit mask for its lws_log_levels enum. See the
|
||||
# libwebsockets documentation for more details. "log_type websockets" must also
|
||||
# be enabled.
|
||||
#websockets_log_level 0
|
||||
|
||||
|
||||
# =================================================================
|
||||
# Security
|
||||
# =================================================================
|
||||
|
||||
# If set, only clients that have a matching prefix on their
|
||||
# clientid will be allowed to connect to the broker. By default,
|
||||
# all clients may connect.
|
||||
# For example, setting "secure-" here would mean a client "secure-
|
||||
# client" could connect but another with clientid "mqtt" couldn't.
|
||||
#clientid_prefixes
|
||||
|
||||
# Boolean value that determines whether clients that connect
|
||||
# without providing a username are allowed to connect. If set to
|
||||
# false then a password file should be created (see the
|
||||
# password_file option) to control authenticated client access.
|
||||
#
|
||||
# Defaults to false, unless there are no listeners defined in the configuration
|
||||
# file, in which case it is set to true, but connections are only allowed from
|
||||
# the local machine.
|
||||
#allow_anonymous false
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Default authentication and topic access control
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
# Control access to the broker using a password file. This file can be
|
||||
# generated using the mosquitto_passwd utility. If TLS support is not compiled
|
||||
# into mosquitto (it is recommended that TLS support should be included) then
|
||||
# plain text passwords are used, in which case the file should be a text file
|
||||
# with lines in the format:
|
||||
# username:password
|
||||
# The password (and colon) may be omitted if desired, although this
|
||||
# offers very little in the way of security.
|
||||
#
|
||||
# See the TLS client require_certificate and use_identity_as_username options
|
||||
# for alternative authentication options. If a plugin is used as well as
|
||||
# password_file, the plugin check will be made first.
|
||||
#password_file
|
||||
|
||||
# Access may also be controlled using a pre-shared-key file. This requires
|
||||
# TLS-PSK support and a listener configured to use it. The file should be text
|
||||
# lines in the format:
|
||||
# identity:key
|
||||
# The key should be in hexadecimal format without a leading "0x".
|
||||
# If an plugin is used as well, the plugin check will be made first.
|
||||
#psk_file
|
||||
|
||||
# Control access to topics on the broker using an access control list
|
||||
# file. If this parameter is defined then only the topics listed will
|
||||
# have access.
|
||||
# If the first character of a line of the ACL file is a # it is treated as a
|
||||
# comment.
|
||||
# Topic access is added with lines of the format:
|
||||
#
|
||||
# topic [read|write|readwrite|deny] <topic>
|
||||
#
|
||||
# The access type is controlled using "read", "write", "readwrite" or "deny".
|
||||
# This parameter is optional (unless <topic> contains a space character) - if
|
||||
# not given then the access is read/write. <topic> can contain the + or #
|
||||
# wildcards as in subscriptions.
|
||||
#
|
||||
# The "deny" option can used to explicity deny access to a topic that would
|
||||
# otherwise be granted by a broader read/write/readwrite statement. Any "deny"
|
||||
# topics are handled before topics that grant read/write access.
|
||||
#
|
||||
# The first set of topics are applied to anonymous clients, assuming
|
||||
# allow_anonymous is true. User specific topic ACLs are added after a
|
||||
# user line as follows:
|
||||
#
|
||||
# user <username>
|
||||
#
|
||||
# The username referred to here is the same as in password_file. It is
|
||||
# not the clientid.
|
||||
#
|
||||
#
|
||||
# If is also possible to define ACLs based on pattern substitution within the
|
||||
# topic. The patterns available for substition are:
|
||||
#
|
||||
# %c to match the client id of the client
|
||||
# %u to match the username of the client
|
||||
#
|
||||
# The substitution pattern must be the only text for that level of hierarchy.
|
||||
#
|
||||
# The form is the same as for the topic keyword, but using pattern as the
|
||||
# keyword.
|
||||
# Pattern ACLs apply to all users even if the "user" keyword has previously
|
||||
# been given.
|
||||
#
|
||||
# If using bridges with usernames and ACLs, connection messages can be allowed
|
||||
# with the following pattern:
|
||||
# pattern write $SYS/broker/connection/%c/state
|
||||
#
|
||||
# pattern [read|write|readwrite] <topic>
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# pattern write sensor/%u/data
|
||||
#
|
||||
# If an plugin is used as well as acl_file, the plugin check will be
|
||||
# made first.
|
||||
#acl_file
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# External authentication and topic access plugin options
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
# External authentication and access control can be supported with the
|
||||
# plugin option. This is a path to a loadable plugin. See also the
|
||||
# plugin_opt_* options described below.
|
||||
#
|
||||
# The plugin option can be specified multiple times to load multiple
|
||||
# plugins. The plugins will be processed in the order that they are specified
|
||||
# here. If the plugin option is specified alongside either of
|
||||
# password_file or acl_file then the plugin checks will be made first.
|
||||
#
|
||||
# If the per_listener_settings option is false, the plugin will be apply to all
|
||||
# listeners. If per_listener_settings is true, then the plugin will apply to
|
||||
# the current listener being defined only.
|
||||
#
|
||||
# This option is also available as `auth_plugin`, but this use is deprecated
|
||||
# and will be removed in the future.
|
||||
#
|
||||
#plugin
|
||||
|
||||
# If the plugin option above is used, define options to pass to the
|
||||
# plugin here as described by the plugin instructions. All options named
|
||||
# using the format plugin_opt_* will be passed to the plugin, for example:
|
||||
#
|
||||
# This option is also available as `auth_opt_*`, but this use is deprecated
|
||||
# and will be removed in the future.
|
||||
#
|
||||
# plugin_opt_db_host
|
||||
# plugin_opt_db_port
|
||||
# plugin_opt_db_username
|
||||
# plugin_opt_db_password
|
||||
|
||||
|
||||
# =================================================================
|
||||
# Bridges
|
||||
# =================================================================
|
||||
|
||||
# A bridge is a way of connecting multiple MQTT brokers together.
|
||||
# Create a new bridge using the "connection" option as described below. Set
|
||||
# options for the bridges using the remaining parameters. You must specify the
|
||||
# address and at least one topic to subscribe to.
|
||||
#
|
||||
# Each connection must have a unique name.
|
||||
#
|
||||
# The address line may have multiple host address and ports specified. See
|
||||
# below in the round_robin description for more details on bridge behaviour if
|
||||
# multiple addresses are used. Note that if you use an IPv6 address, then you
|
||||
# are required to specify a port.
|
||||
#
|
||||
# The direction that the topic will be shared can be chosen by
|
||||
# specifying out, in or both, where the default value is out.
|
||||
# The QoS level of the bridged communication can be specified with the next
|
||||
# topic option. The default QoS level is 0, to change the QoS the topic
|
||||
# direction must also be given.
|
||||
#
|
||||
# The local and remote prefix options allow a topic to be remapped when it is
|
||||
# bridged to/from the remote broker. This provides the ability to place a topic
|
||||
# tree in an appropriate location.
|
||||
#
|
||||
# For more details see the mosquitto.conf man page.
|
||||
#
|
||||
# Multiple topics can be specified per connection, but be careful
|
||||
# not to create any loops.
|
||||
#
|
||||
# If you are using bridges with cleansession set to false (the default), then
|
||||
# you may get unexpected behaviour from incoming topics if you change what
|
||||
# topics you are subscribing to. This is because the remote broker keeps the
|
||||
# subscription for the old topic. If you have this problem, connect your bridge
|
||||
# with cleansession set to true, then reconnect with cleansession set to false
|
||||
# as normal.
|
||||
#connection <name>
|
||||
#address <host>[:<port>] [<host>[:<port>]]
|
||||
#topic <topic> [[[out | in | both] qos-level] local-prefix remote-prefix]
|
||||
|
||||
# If you need to have the bridge connect over a particular network interface,
|
||||
# use bridge_bind_address to tell the bridge which local IP address the socket
|
||||
# should bind to, e.g. `bridge_bind_address 192.168.1.10`
|
||||
#bridge_bind_address
|
||||
|
||||
# If a bridge has topics that have "out" direction, the default behaviour is to
|
||||
# send an unsubscribe request to the remote broker on that topic. This means
|
||||
# that changing a topic direction from "in" to "out" will not keep receiving
|
||||
# incoming messages. Sending these unsubscribe requests is not always
|
||||
# desirable, setting bridge_attempt_unsubscribe to false will disable sending
|
||||
# the unsubscribe request.
|
||||
#bridge_attempt_unsubscribe true
|
||||
|
||||
# Set the version of the MQTT protocol to use with for this bridge. Can be one
|
||||
# of mqttv50, mqttv311 or mqttv31. Defaults to mqttv311.
|
||||
#bridge_protocol_version mqttv311
|
||||
|
||||
# Set the clean session variable for this bridge.
|
||||
# When set to true, when the bridge disconnects for any reason, all
|
||||
# messages and subscriptions will be cleaned up on the remote
|
||||
# broker. Note that with cleansession set to true, there may be a
|
||||
# significant amount of retained messages sent when the bridge
|
||||
# reconnects after losing its connection.
|
||||
# When set to false, the subscriptions and messages are kept on the
|
||||
# remote broker, and delivered when the bridge reconnects.
|
||||
#cleansession false
|
||||
|
||||
# Set the amount of time a bridge using the lazy start type must be idle before
|
||||
# it will be stopped. Defaults to 60 seconds.
|
||||
#idle_timeout 60
|
||||
|
||||
# Set the keepalive interval for this bridge connection, in
|
||||
# seconds.
|
||||
#keepalive_interval 60
|
||||
|
||||
# Set the clientid to use on the local broker. If not defined, this defaults to
|
||||
# 'local.<clientid>'. If you are bridging a broker to itself, it is important
|
||||
# that local_clientid and clientid do not match.
|
||||
#local_clientid
|
||||
|
||||
# If set to true, publish notification messages to the local and remote brokers
|
||||
# giving information about the state of the bridge connection. Retained
|
||||
# messages are published to the topic $SYS/broker/connection/<clientid>/state
|
||||
# unless the notification_topic option is used.
|
||||
# If the message is 1 then the connection is active, or 0 if the connection has
|
||||
# failed.
|
||||
# This uses the last will and testament feature.
|
||||
#notifications true
|
||||
|
||||
# Choose the topic on which notification messages for this bridge are
|
||||
# published. If not set, messages are published on the topic
|
||||
# $SYS/broker/connection/<clientid>/state
|
||||
#notification_topic
|
||||
|
||||
# Set the client id to use on the remote end of this bridge connection. If not
|
||||
# defined, this defaults to 'name.hostname' where name is the connection name
|
||||
# and hostname is the hostname of this computer.
|
||||
# This replaces the old "clientid" option to avoid confusion. "clientid"
|
||||
# remains valid for the time being.
|
||||
#remote_clientid
|
||||
|
||||
# Set the password to use when connecting to a broker that requires
|
||||
# authentication. This option is only used if remote_username is also set.
|
||||
# This replaces the old "password" option to avoid confusion. "password"
|
||||
# remains valid for the time being.
|
||||
#remote_password
|
||||
|
||||
# Set the username to use when connecting to a broker that requires
|
||||
# authentication.
|
||||
# This replaces the old "username" option to avoid confusion. "username"
|
||||
# remains valid for the time being.
|
||||
#remote_username
|
||||
|
||||
# Set the amount of time a bridge using the automatic start type will wait
|
||||
# until attempting to reconnect.
|
||||
# This option can be configured to use a constant delay time in seconds, or to
|
||||
# use a backoff mechanism based on "Decorrelated Jitter", which adds a degree
|
||||
# of randomness to when the restart occurs.
|
||||
#
|
||||
# Set a constant timeout of 20 seconds:
|
||||
# restart_timeout 20
|
||||
#
|
||||
# Set backoff with a base (start value) of 10 seconds and a cap (upper limit) of
|
||||
# 60 seconds:
|
||||
# restart_timeout 10 30
|
||||
#
|
||||
# Defaults to jitter with a base of 5 and cap of 30
|
||||
#restart_timeout 5 30
|
||||
|
||||
# If the bridge has more than one address given in the address/addresses
|
||||
# configuration, the round_robin option defines the behaviour of the bridge on
|
||||
# a failure of the bridge connection. If round_robin is false, the default
|
||||
# value, then the first address is treated as the main bridge connection. If
|
||||
# the connection fails, the other secondary addresses will be attempted in
|
||||
# turn. Whilst connected to a secondary bridge, the bridge will periodically
|
||||
# attempt to reconnect to the main bridge until successful.
|
||||
# If round_robin is true, then all addresses are treated as equals. If a
|
||||
# connection fails, the next address will be tried and if successful will
|
||||
# remain connected until it fails
|
||||
#round_robin false
|
||||
|
||||
# Set the start type of the bridge. This controls how the bridge starts and
|
||||
# can be one of three types: automatic, lazy and once. Note that RSMB provides
|
||||
# a fourth start type "manual" which isn't currently supported by mosquitto.
|
||||
#
|
||||
# "automatic" is the default start type and means that the bridge connection
|
||||
# will be started automatically when the broker starts and also restarted
|
||||
# after a short delay (30 seconds) if the connection fails.
|
||||
#
|
||||
# Bridges using the "lazy" start type will be started automatically when the
|
||||
# number of queued messages exceeds the number set with the "threshold"
|
||||
# parameter. It will be stopped automatically after the time set by the
|
||||
# "idle_timeout" parameter. Use this start type if you wish the connection to
|
||||
# only be active when it is needed.
|
||||
#
|
||||
# A bridge using the "once" start type will be started automatically when the
|
||||
# broker starts but will not be restarted if the connection fails.
|
||||
#start_type automatic
|
||||
|
||||
# Set the number of messages that need to be queued for a bridge with lazy
|
||||
# start type to be restarted. Defaults to 10 messages.
|
||||
# Must be less than max_queued_messages.
|
||||
#threshold 10
|
||||
|
||||
# If try_private is set to true, the bridge will attempt to indicate to the
|
||||
# remote broker that it is a bridge not an ordinary client. If successful, this
|
||||
# means that loop detection will be more effective and that retained messages
|
||||
# will be propagated correctly. Not all brokers support this feature so it may
|
||||
# be necessary to set try_private to false if your bridge does not connect
|
||||
# properly.
|
||||
#try_private true
|
||||
|
||||
# Some MQTT brokers do not allow retained messages. MQTT v5 gives a mechanism
|
||||
# for brokers to tell clients that they do not support retained messages, but
|
||||
# this is not possible for MQTT v3.1.1 or v3.1. If you need to bridge to a
|
||||
# v3.1.1 or v3.1 broker that does not support retained messages, set the
|
||||
# bridge_outgoing_retain option to false. This will remove the retain bit on
|
||||
# all outgoing messages to that bridge, regardless of any other setting.
|
||||
#bridge_outgoing_retain true
|
||||
|
||||
# If you wish to restrict the size of messages sent to a remote bridge, use the
|
||||
# bridge_max_packet_size option. This sets the maximum number of bytes for
|
||||
# the total message, including headers and payload.
|
||||
# Note that MQTT v5 brokers may provide their own maximum-packet-size property.
|
||||
# In this case, the smaller of the two limits will be used.
|
||||
# Set to 0 for "unlimited".
|
||||
#bridge_max_packet_size 0
|
||||
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Certificate based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# Either bridge_cafile or bridge_capath must be defined to enable TLS support
|
||||
# for this bridge.
|
||||
# bridge_cafile defines the path to a file containing the
|
||||
# Certificate Authority certificates that have signed the remote broker
|
||||
# certificate.
|
||||
# bridge_capath defines a directory that will be searched for files containing
|
||||
# the CA certificates. For bridge_capath to work correctly, the certificate
|
||||
# files must have ".crt" as the file ending and you must run "openssl rehash
|
||||
# <path to capath>" each time you add/remove a certificate.
|
||||
#bridge_cafile
|
||||
#bridge_capath
|
||||
|
||||
|
||||
# If the remote broker has more than one protocol available on its port, e.g.
|
||||
# MQTT and WebSockets, then use bridge_alpn to configure which protocol is
|
||||
# requested. Note that WebSockets support for bridges is not yet available.
|
||||
#bridge_alpn
|
||||
|
||||
# When using certificate based encryption, bridge_insecure disables
|
||||
# verification of the server hostname in the server certificate. This can be
|
||||
# useful when testing initial server configurations, but makes it possible for
|
||||
# a malicious third party to impersonate your server through DNS spoofing, for
|
||||
# example. Use this option in testing only. If you need to resort to using this
|
||||
# option in a production environment, your setup is at fault and there is no
|
||||
# point using encryption.
|
||||
#bridge_insecure false
|
||||
|
||||
# Path to the PEM encoded client certificate, if required by the remote broker.
|
||||
#bridge_certfile
|
||||
|
||||
# Path to the PEM encoded client private key, if required by the remote broker.
|
||||
#bridge_keyfile
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# PSK based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# Pre-shared-key encryption provides an alternative to certificate based
|
||||
# encryption. A bridge can be configured to use PSK with the bridge_identity
|
||||
# and bridge_psk options. These are the client PSK identity, and pre-shared-key
|
||||
# in hexadecimal format with no "0x". Only one of certificate and PSK based
|
||||
# encryption can be used on one
|
||||
# bridge at once.
|
||||
#bridge_identity
|
||||
#bridge_psk
|
||||
|
||||
|
||||
# =================================================================
|
||||
# External config files
|
||||
# =================================================================
|
||||
|
||||
# External configuration files may be included by using the
|
||||
# include_dir option. This defines a directory that will be searched
|
||||
# for config files. All files that end in '.conf' will be loaded as
|
||||
# a configuration file. It is best to have this as the last option
|
||||
# in the main file. This option will only be processed from the main
|
||||
# configuration file. The directory specified must not contain the
|
||||
# main configuration file.
|
||||
# Files within include_dir will be loaded sorted in case-sensitive
|
||||
# alphabetical order, with capital letters ordered first. If this option is
|
||||
# given multiple times, all of the files from the first instance will be
|
||||
# processed before the next instance. See the man page for examples.
|
||||
#include_dir
|
|
@ -1,70 +0,0 @@
|
|||
# vim: set sw=4 ts=4 sts=4 et :
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
return 301 https://$host$request_uri;
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
|
||||
location = /50x.html { }
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
ssl_certificate "/etc/nginx/ssl/server.crt";
|
||||
ssl_certificate_key "/etc/nginx/ssl/server.key";
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
|
||||
add_header
|
||||
Strict-Transport-Security
|
||||
"max-age=63072000; includeSubDomains"
|
||||
always;
|
||||
|
||||
location = /50x.html { }
|
||||
|
||||
location = /zwave {
|
||||
return 301 https://$host/zwave/;
|
||||
}
|
||||
|
||||
location = /zigbee {
|
||||
return 301 https://$host/zigbee/;
|
||||
}
|
||||
|
||||
location /zwave/ {
|
||||
proxy_pass http://127.0.0.1:8091/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header X-External-Path /zwave;
|
||||
}
|
||||
|
||||
location /zigbee/ {
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header X-External-Path /zigbee;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://[::1]:8123/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
worker_processes auto;
|
||||
|
||||
error_log stderr notice;
|
||||
pid /tmp/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
client_body_temp_path /tmp/client_temp;
|
||||
proxy_temp_path /tmp/proxy_temp;
|
||||
fastcgi_temp_path /tmp/fastcgi_temp;
|
||||
uwsgi_temp_path /tmp/uwsgi_temp;
|
||||
scgi_temp_path /tmp/scgi_temp;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log syslog:server=unix:/dev/log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
# vim: set ft=systemd :
|
||||
[Unit]
|
||||
Description=Generate self-signed certificate for nginx
|
||||
Before=nginx.service
|
||||
ConditionPathExists=!/etc/nginx/ssl/server.crt
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/libexec/gen-nginx-cert
|
||||
User=root
|
||||
Group=nginx
|
||||
CapabilityBoundingSet=
|
||||
DeviceAllow=
|
||||
DevicePolicy=closed
|
||||
IPAddressDeny=any
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=yes
|
||||
NoNewPrivileges=yes
|
||||
PrivateDevices=yes
|
||||
PrivateNetwork=yes
|
||||
PrivateTmp=yes
|
||||
PrivateUsers=yes
|
||||
ProcSubset=pid
|
||||
ProtectClock=yes
|
||||
ProtectControlGroups=yes
|
||||
ProtectHome=yes
|
||||
ProtectHostname=yes
|
||||
ProtectKernelLogs=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectProc=invisible
|
||||
ProtectSystem=yes
|
||||
RestrictAddressFamilies=
|
||||
RestrictNamespaces=yes
|
||||
RestrictRealtime=yes
|
||||
RestrictSUIDSGID=yes
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
SystemCallFilter=~@privileged
|
||||
UMask=0027
|
|
@ -1,2 +0,0 @@
|
|||
u homeassistant 300 "Home Assistant" /var/lib/homeassistant /bin/sh
|
||||
g homeassistant 300
|
|
@ -1,2 +0,0 @@
|
|||
u mosquitto 301 "Eclipse Mosquitto MQTT Broker" /var/lib/mosquitto /sbin/nologin
|
||||
g mosquitto 301
|
|
@ -1,2 +0,0 @@
|
|||
u zigbee2mqtt 302 Zigbee2MQTT /var/lib/zigbee2mqtt /sbin/nologin
|
||||
g zigbee2mqtt 302
|
|
@ -1,3 +0,0 @@
|
|||
u zwavejs 303 ZWaveJS /var/lib/zwavejs /sbin/nologin
|
||||
g zwavejs 303
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
v /var/lib/homeassistant 0700 homeassistant homeassistant - -
|
||||
C /var/lib/homeassistant/automations.yaml - - - -
|
||||
C /var/lib/homeassistant/configuration.yaml - - - -
|
||||
C /var/lib/homeassistant/groups.yaml - - - -
|
||||
C /var/lib/homeassistant/http.yaml - - - -
|
||||
C /var/lib/homeassistant/scenes.yaml - - - -
|
||||
C /var/lib/homeassistant/scripts.yaml - - - -
|
||||
C /var/lib/homeassistant/secrets.yaml - - - -
|
|
@ -1,2 +0,0 @@
|
|||
v /var/lib/mosquitto 0700 mosquitto mosquitto - -
|
||||
d /var/log/mosquitto 0755 mosquitto mosquitto - -
|
|
@ -1 +0,0 @@
|
|||
d /var/lib/zigbee2mqtt 0700 zigbee2mqtt zigbee2mqtt - -
|
|
@ -1 +0,0 @@
|
|||
d /var/lib/zwavejs 0700 zwavejs zwavejs - -
|
|
@ -1,38 +0,0 @@
|
|||
#!/bin/sh
|
||||
# vim: set sw=4 ts=4 sts=4 et :
|
||||
|
||||
DAYS=90
|
||||
SUBJ=/CN=localhost
|
||||
ALG=EC
|
||||
CURVE=secp384r1
|
||||
|
||||
if [ -f /etc/default/gen-nginx-cert ]; then
|
||||
. /etc/default/gen-nginx-cert
|
||||
fi
|
||||
|
||||
set -- \
|
||||
-out /etc/nginx/ssl/server.key \
|
||||
-algorithm "${ALG}"
|
||||
|
||||
case "${ALG}" in
|
||||
EC)
|
||||
set -- "$@" \
|
||||
-pkeyopt ec_paramgen_curve:${CURVE} \
|
||||
-pkeyopt ec_param_enc:named_curve
|
||||
;;
|
||||
RSA)
|
||||
set -- "$@" \
|
||||
-pkeyopt rsa_keygen_bits:${BITS:+4096}
|
||||
;;
|
||||
esac
|
||||
|
||||
rm -f /etc/nginx/ssl/server.crt /etc/nginx/ssl/server.key
|
||||
: > /etc/nginx/ssl/server.key
|
||||
openssl genpkey "$@"
|
||||
openssl \
|
||||
req -x509 \
|
||||
-subj "${SUBJ}" \
|
||||
-key /etc/nginx/ssl/server.key \
|
||||
-out /etc/nginx/ssl/server.crt \
|
||||
-sha256 \
|
||||
-days "${DAYS}"
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
# Configure a default setup of Home Assistant (frontend, api, etc)
|
||||
default_config:
|
||||
|
||||
http: !include http.yaml
|
||||
|
||||
# Text to speech
|
||||
tts:
|
||||
- platform: google_translate
|
||||
|
||||
group: !include groups.yaml
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
scene: !include scenes.yaml
|
|
@ -1,4 +0,0 @@
|
|||
server_host: '::1'
|
||||
trusted_proxies:
|
||||
- '::1'
|
||||
use_x_forwarded_for: true
|
|
@ -1 +0,0 @@
|
|||
{}
|
|
@ -1 +0,0 @@
|
|||
FEATURES=-buildpkg
|
|
@ -1 +0,0 @@
|
|||
ACCEPT_KEYWORDS="${ARCH}"
|
|
@ -1,2 +0,0 @@
|
|||
FEATURES="${FEATURES} binpkg-multi-instance buildpkg"
|
||||
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg --binpkg-respect-use=y"
|
|
@ -1,2 +0,0 @@
|
|||
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --quiet-build=y --quiet-fail=y"
|
||||
FEATURES="${FEATURES} -news"
|
|
@ -1 +0,0 @@
|
|||
/var/db/repos/gentoo/profiles/default/linux/amd64/17.1/no-multilib
|
|
@ -1 +0,0 @@
|
|||
sys-fs/genimage ~amd64
|
|
@ -1 +0,0 @@
|
|||
sys-kernel/raspberrypi-sources **
|
|
@ -1,6 +0,0 @@
|
|||
# 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 +0,0 @@
|
|||
sys-fs/btrfs-progs -man
|
|
@ -1 +0,0 @@
|
|||
dev-vcs/git -perl
|
|
@ -1 +0,0 @@
|
|||
sys-boot/grub -* GRUB_PLATFORMS: -*
|
|
@ -1,2 +0,0 @@
|
|||
sys-kernel/gentoo-sources symlink
|
||||
sys-kernel/raspberrypi-sources symlink
|
|
@ -1,2 +0,0 @@
|
|||
sys-libs/libselinux python
|
||||
sys-process/audit python
|
|
@ -1 +0,0 @@
|
|||
sys-fs/squashfs-tools zstd
|
|
@ -1,4 +0,0 @@
|
|||
sys-apps/dbus systemd
|
||||
sys-apps/systemd -*
|
||||
sec-policy/selinux-base systemd
|
||||
sec-policy/selinux-base-policy systemd
|
|
@ -1,659 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,656 +0,0 @@
|
|||
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 \
|
|
@ -1,74 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
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 +0,0 @@
|
|||
fowners() { :; }
|
|
@ -1 +0,0 @@
|
|||
FEATURES=-buildpkg
|
|
@ -1 +0,0 @@
|
|||
ACCEPT_KEYWORDS="${ARCH} ~${ARCH}"
|
|
@ -1,22 +0,0 @@
|
|||
# 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/"
|
|
@ -1,2 +0,0 @@
|
|||
FEATURES="${FEATURES} binpkg-multi-instance buildpkg"
|
||||
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg --binpkg-respect-use=y"
|
|
@ -1 +0,0 @@
|
|||
USE='-man -doc minimal pam zstd'
|
|
@ -1,2 +0,0 @@
|
|||
GOOS=linux
|
||||
GOARCH=${ARCH}
|
|
@ -1,3 +0,0 @@
|
|||
LINGUAS=en
|
||||
L10N=en-US
|
||||
USE="${USE} -nls"
|
|
@ -1,2 +0,0 @@
|
|||
USE="${USE} -unconfined"
|
||||
POLICY_TYPES=mcs
|
|
@ -1,2 +0,0 @@
|
|||
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --quiet-build=y"
|
||||
FEATURES="${FEATURES} -news"
|
|
@ -1 +0,0 @@
|
|||
/var/db/repos/gentoo/profiles/default/linux/arm64/17.0/systemd/selinux/merged-usr
|
|
@ -1 +0,0 @@
|
|||
app-backup/burp **
|
|
@ -1 +0,0 @@
|
|||
sys-kernel/linux-firmware nobuildpkg
|
|
@ -1 +0,0 @@
|
|||
sys-boot/raspberrypi-firmware nobuildpkg
|
|
@ -1,2 +0,0 @@
|
|||
sys-boot/raspberrypi-firmware raspberrypi-videocore-bin
|
||||
sys-kernel/linux-firmware linux-fw-redistributable
|
|
@ -1 +0,0 @@
|
|||
app-alternatives/awk -gawk busybox
|
|
@ -1 +0,0 @@
|
|||
sys-apps/busybox savedconfig
|
|
@ -1 +0,0 @@
|
|||
sys-kernel/linux-firmware compress compress-xz savedconfig
|
|
@ -1 +0,0 @@
|
|||
sys-devel/binutils gold
|
|
@ -1 +0,0 @@
|
|||
sys-boot/grub -* GRUB_PLATFORMS: -* efi-64
|
|
@ -1 +0,0 @@
|
|||
net-firewall/iptables conntrack nftables
|
|
@ -1 +0,0 @@
|
|||
dev-lang/python -ensurepip
|
|
@ -1 +0,0 @@
|
|||
sys-boot/u-boot savedconfig
|
|
@ -1 +0,0 @@
|
|||
selinux-base
|
|
@ -1,40 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue