This pull request contains Broadcom ARM-based SoCs Device Tree changes

for 6.10, please pull the following:
 
 - Laurent converts the Raspberry Pi firmware DT binding to YAML, updates
   the firmware driver to use the proper 'struct device' reference for
   DMA mappings and drops unneeded properties from the DT node and
   finishes by removing the duplicate firmware-clocks property to
   bcm2835-rpi.dtsi. He also added support for the CAM1 camera interface
   regulator.
 
 - Uwe adds a pinctrl-based multiplexing description to allow the use of
   I2C0 pins to allow usage between the 40-pin Raspberry Pi header and
   the CSI and DSI connectors. He then describes the PCF85063 RTC device
   available on the CM4 I/O board making use of that pinctrl-based
   muxing.
 
 - Arinc updates the Asus RT-AC3100 and RT-AC88U DTs to have proper LED
   colors and function properties, NVMEM MAC addresses and removes
   duplicates and unnecessary properties and does a few Device Tree
   cleanups.. He then adds support for the Asus RT-AC3200 (BCM4709-based)
   and RT-AC3500 routers.
 
 - Jean-Michel adds DT nodes for the CSI Unicam camera interfaces on the
   Raspberry Pi 4 / BCM2711 SoCs
 
 - Florian adds support for the Ethernet LEDs on Raspberry Pi 4 B and
   Raspberry Pi 4 CM boards.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmYwBsUACgkQh9CWnEQH
 BwTeNg//THwPFu55oCQ+CsI6xUAPmcffjEcMk1qiELOo7PyoY9UkjKtjOMCW44tZ
 uwAtzy3jMPaFI1Ng/EZPErz7KOlwoNeqIjTvOpbRw1tVJ/7tkrnk5vi8zqRQUv4a
 jrAv+yybXDaKD/aFX41KH43OfMl0Fi5CnxUqlb5U8Mm0awwBfz2jvnetaZAuueAd
 Hwet2Lt/jOX43GVVHRaxaqP/rJnr7xdUUW7iCQ+Qi2xvXJIpNj/mL6tvVAKFe2JZ
 sig3uh/NtK6Pp1xAX78aTuf0L4NLFqQpVORuO1ncb4wT92U0Yhi3r47z4reAM6GN
 nX5rLEjeV/yaRA2532c9MVALRT+4f1ic0Pq8Knj7WaH0bRrTjKQK4YiwR0KdXhy1
 GGC58bUOa1HKynZXCDxVih0oOS4REd511WyiLqSPdpsvzrtHCqwC59LOh5PDaoEn
 9aBof7eRK8r7KXEsvU3av5WiJjM+O2ILrRlfuiBt/nuvyvX1G3uSTq3Gncb4e2n8
 1LWGpnj1CyW64seJ2v3a1Mx07ArWgy1wwg3iRt1aOMcKHrfO3evLdRwHlFq2Ke+t
 U0cvR6nlpo9H6CPCMCU/LmK3chYWBDlIghua3v7AJSL9p9o6RcWyAV8SrP/E60A4
 0O1rfNdLhQkl5MmIyhA5QTaAvsGplb9QNkf8m9Rx7e8krDTJjXA=
 =400A
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwpCEACgkQYKtH/8kJ
 UiePmBAAlIjEJE9IE2DnrrqnCrSbGg08R5ZNWEHzSdPAXDVR3nUBrPXPosbCDKQE
 iBUyF8APNPFogzfQJXR86vw7Wx067R95M6TLpAI4CuT47YAx1ALvC3oEy5Xua6OE
 VgN+998sWLodnCAT8M/ZcmH5uWtCxWETwGNQJsU960sVa17h/q11WpM8NzKmSq3J
 h+toBPNBfdyGyd2UBqcdnCiX5nLLCWOdryBJYaOHiohCKlbMtqn7eYlEUdyCIq3O
 Q/O4p9gj92Df5rv2GTVycsO9LXbaYvIRsmcukxwR8FGV+mkIBmUaEfbazEbyjoJh
 kjRMfvQ08P3a44wTuUVJrrnEvP3X8JUteZucGR0A8zsndt57ZUznYBYYcT63DMbN
 /bDYbtbOOUu4/KkKt2eQiQAN1fApl22HhRybuuIlzN51mki3Qv9JioSVbQDbn6PU
 M1CcvGn83k/UzPFlINDWHogSO+MyrCNk8zYPWpKjxwWAM6Twx/Ly0cmui6+91SeM
 z4K0YZUYYH/1rCoScose2ByesAUu6HNBBGnYfobUSPCF5tMT7tMHd1kP5WxcStJ7
 I58yLo+DFUX8EVePOfFx7QdzJR4JuVRKH498WnQ+0Xew6FpUhwvOC1DNK+W211jA
 gNpUQd9s4sV9nXT0gLSPr2rbJW2AS2O+Btphpg5NiYU3VSOJXSQ=
 =L8Aj
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-6.10/devicetree' of https://github.com/Broadcom/stblinux into soc/dt

This pull request contains Broadcom ARM-based SoCs Device Tree changes
for 6.10, please pull the following:

- Laurent converts the Raspberry Pi firmware DT binding to YAML, updates
  the firmware driver to use the proper 'struct device' reference for
  DMA mappings and drops unneeded properties from the DT node and
  finishes by removing the duplicate firmware-clocks property to
  bcm2835-rpi.dtsi. He also added support for the CAM1 camera interface
  regulator.

- Uwe adds a pinctrl-based multiplexing description to allow the use of
  I2C0 pins to allow usage between the 40-pin Raspberry Pi header and
  the CSI and DSI connectors. He then describes the PCF85063 RTC device
  available on the CM4 I/O board making use of that pinctrl-based
  muxing.

- Arinc updates the Asus RT-AC3100 and RT-AC88U DTs to have proper LED
  colors and function properties, NVMEM MAC addresses and removes
  duplicates and unnecessary properties and does a few Device Tree
  cleanups.. He then adds support for the Asus RT-AC3200 (BCM4709-based)
  and RT-AC3500 routers.

- Jean-Michel adds DT nodes for the CSI Unicam camera interfaces on the
  Raspberry Pi 4 / BCM2711 SoCs

- Florian adds support for the Ethernet LEDs on Raspberry Pi 4 B and
  Raspberry Pi 4 CM boards.

* tag 'arm-soc/for-6.10/devicetree' of https://github.com/Broadcom/stblinux:
  arm: dts: bcm2711: Describe Ethernet LEDs
  ARM: dts: BCM5301X: Conform to DTS Coding Style on ASUS RT-AC3100 & AC88U
  ARM: dts: BCM5301X: Add DT for ASUS RT-AC5300
  ARM: dts: BCM5301X: Add DT for ASUS RT-AC3200
  dt-bindings: arm: bcm: add bindings for ASUS RT-AC5300
  dt-bindings: arm: bcm: add bindings for ASUS RT-AC3200
  ARM: dts: bcm2835: Add Unicam CSI nodes
  ARM: dts: BCM5301X: remove earlycon on ASUS RT-AC3100 and ASUS RT-AC88U
  ARM: dts: BCM5301X: remove duplicate compatible on ASUS RT-AC3100 & AC88U
  ARM: dts: BCM5301X: provide address for SoC MACs on ASUS RT-AC3100 & AC88U
  ARM: dts: BCM5301X: use color and function on ASUS RT-AC3100 and RT-AC88U
  ARM: dts: bcm2711-rpi-4-b: Add CAM1 regulator
  ARM: dts: bcm2711-rpi-cm4-io: Add RTC on I2C0
  ARM: dts: bcm2711-rpi: Add pinctrl-based multiplexing for I2C0
  ARM: dts: bcm2835-rpi: Move duplicate firmware-clocks to bcm2835-rpi.dtsi
  ARM: dts: bcm283x: Drop unneeded properties in the bcm2835-firmware node
  firmware: raspberrypi: Use correct device for DMA mappings
  dt-bindings: arm: bcm: raspberrypi,bcm2835-firmware: Add gpio child node

Link: https://lore.kernel.org/r/20240429213703.2327834-2-florian.fainelli@broadcom.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2024-04-30 09:56:16 +02:00
commit 07b8c4bbff
18 changed files with 619 additions and 160 deletions

View File

@ -53,6 +53,7 @@ properties:
- description: BCM4709 based boards
items:
- enum:
- asus,rt-ac3200
- asus,rt-ac87u
- buffalo,wxr-1900dhp
- linksys,ea9200
@ -67,6 +68,7 @@ properties:
items:
- enum:
- asus,rt-ac3100
- asus,rt-ac5300
- asus,rt-ac88u
- dlink,dir-885l
- dlink,dir-890l

View File

@ -46,6 +46,30 @@ properties:
- compatible
- "#clock-cells"
gpio:
type: object
additionalProperties: false
properties:
compatible:
const: raspberrypi,firmware-gpio
gpio-controller: true
"#gpio-cells":
const: 2
description:
The first cell is the pin number, and the second cell is used to
specify the gpio polarity (GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW).
gpio-line-names:
minItems: 8
required:
- compatible
- gpio-controller
- "#gpio-cells"
reset:
type: object
additionalProperties: false
@ -96,6 +120,12 @@ examples:
#clock-cells = <1>;
};
expgpio: gpio {
compatible = "raspberrypi,firmware-gpio";
gpio-controller;
#gpio-cells = <2>;
};
reset: reset {
compatible = "raspberrypi,firmware-reset";
#reset-cells = <1>;

View File

@ -1,30 +0,0 @@
Raspberry Pi GPIO expander
The Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware. The
firmware exposes a mailbox interface that allows the ARM core to control the
GPIO lines on the expander.
The Raspberry Pi GPIO expander node must be a child node of the Raspberry Pi
firmware node.
Required properties:
- compatible : Should be "raspberrypi,firmware-gpio"
- gpio-controller : Marks the device node as a gpio controller
- #gpio-cells : Should be two. The first cell is the pin number, and
the second cell is used to specify the gpio polarity:
0 = active high
1 = active low
Example:
firmware: firmware-rpi {
compatible = "raspberrypi,bcm2835-firmware";
mboxes = <&mailbox>;
expgpio: gpio {
compatible = "raspberrypi,firmware-gpio";
gpio-controller;
#gpio-cells = <2>;
};
};

View File

@ -64,6 +64,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
bcm47081-luxul-xap-1410.dtb \
bcm47081-luxul-xwr-1200.dtb \
bcm47081-tplink-archer-c5-v2.dtb \
bcm4709-asus-rt-ac3200.dtb \
bcm4709-asus-rt-ac87u.dtb \
bcm4709-buffalo-wxr-1900dhp.dtb \
bcm4709-linksys-ea9200.dtb \
@ -71,6 +72,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
bcm4709-netgear-r8000.dtb \
bcm4709-tplink-archer-c9-v1.dtb \
bcm47094-asus-rt-ac3100.dtb \
bcm47094-asus-rt-ac5300.dtb \
bcm47094-asus-rt-ac88u.dtb \
bcm47094-dlink-dir-885l.dtb \
bcm47094-dlink-dir-890l.dtb \

View File

@ -5,6 +5,7 @@
#include "bcm283x-rpi-led-deprecated.dtsi"
#include "bcm283x-rpi-usb-peripheral.dtsi"
#include "bcm283x-rpi-wifi-bt.dtsi"
#include <dt-bindings/leds/common.h>
/ {
compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
@ -15,6 +16,13 @@
stdout-path = "serial1:115200n8";
};
cam1_reg: regulator-cam1 {
compatible = "regulator-fixed";
regulator-name = "cam1-reg";
enable-active-high;
gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
};
sd_io_1v8_reg: regulator-sd-io-1v8 {
compatible = "regulator-gpio";
regulator-name = "vdd-sd-io";
@ -197,6 +205,27 @@
phy1: ethernet-phy@1 {
/* No PHY interrupt */
reg = <0x1>;
leds {
#address-cells = <1>;
#size-cells = <0>;
/* LED1 */
led@0 {
reg = <0>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
/* LED2 */
led@1 {
reg = <1>;
color = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
};
};
};

View File

@ -30,6 +30,7 @@
&genet_mdio {
clock-frequency = <1950000>;
/delete-node/ leds;
};
&led_pwr {

View File

@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include <dt-bindings/leds/common.h>
#include "bcm2711-rpi-cm4.dtsi"
#include "bcm283x-rpi-led-deprecated.dtsi"
#include "bcm283x-rpi-usb-host.dtsi"
@ -101,6 +102,38 @@
status = "okay";
};
&i2c0_1 {
rtc@51 {
/* Attention: An alarm resets the machine */
compatible = "nxp,pcf85063a";
reg = <0x51>;
quartz-load-femtofarads = <7000>;
};
};
&phy1 {
leds {
#address-cells = <1>;
#size-cells = <0>;
/* LED2 */
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
/* LED3 */
led@2 {
reg = <2>;
color = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
};
};
&led_act {
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
};

View File

@ -17,14 +17,33 @@
pcie0 = &pcie0;
blconfig = &blconfig;
};
i2c0mux: i2c-mux0 {
compatible = "i2c-mux-pinctrl";
#address-cells = <1>;
#size-cells = <0>;
i2c-parent = <&i2c0>;
pinctrl-names = "i2c0", "i2c0-vc";
pinctrl-0 = <&i2c0_gpio0>;
pinctrl-1 = <&i2c0_gpio44>;
i2c0_0: i2c@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
};
i2c0_1: i2c@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
};
};
};
&firmware {
firmware_clocks: clocks {
compatible = "raspberrypi,firmware-clocks";
#clock-cells = <1>;
};
expgpio: gpio {
compatible = "raspberrypi,firmware-gpio";
gpio-controller;
@ -54,6 +73,11 @@
clocks = <&firmware_clocks 4>;
};
&i2c0 {
/delete-property/ pinctrl-names;
/delete-property/ pinctrl-0;
};
&rmem {
/*
* RPi4's co-processor will copy the board's bootloader configuration

View File

@ -1114,6 +1114,14 @@
#address-cells = <2>;
};
&csi0 {
interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
};
&csi1 {
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
};
&cma {
/*
* arm64 reserves the CMA by default somewhere in ZONE_DMA32,

View File

@ -7,13 +7,6 @@
#include <dt-bindings/power/raspberrypi-power.h>
&firmware {
firmware_clocks: clocks {
compatible = "raspberrypi,firmware-clocks";
#clock-cells = <1>;
};
};
&hdmi {
clocks = <&firmware_clocks 9>,
<&firmware_clocks 13>;

View File

@ -4,11 +4,12 @@
soc {
firmware: firmware {
compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
#address-cells = <1>;
#size-cells = <1>;
mboxes = <&mailbox>;
dma-ranges;
firmware_clocks: clocks {
compatible = "raspberrypi,firmware-clocks";
#clock-cells = <1>;
};
};
power: power {
@ -25,6 +26,20 @@
};
};
&csi0 {
clocks = <&clocks BCM2835_CLOCK_CAM0>,
<&firmware_clocks 4>;
clock-names = "lp", "vpu";
power-domains = <&power RPI_POWER_DOMAIN_UNICAM0>;
};
&csi1 {
clocks = <&clocks BCM2835_CLOCK_CAM1>,
<&firmware_clocks 4>;
clock-names = "lp", "vpu";
power-domains = <&power RPI_POWER_DOMAIN_UNICAM1>;
};
&gpio {
gpioout: gpioout {
brcm,pins = <6>;

View File

@ -454,6 +454,30 @@
status = "disabled";
};
csi0: csi@7e800000 {
compatible = "brcm,bcm2835-unicam";
reg = <0x7e800000 0x800>,
<0x7e802000 0x4>;
reg-names = "unicam", "cmi";
interrupts = <2 6>;
brcm,num-data-lanes = <2>;
status = "disabled";
port {
};
};
csi1: csi@7e801000 {
compatible = "brcm,bcm2835-unicam";
reg = <0x7e801000 0x800>,
<0x7e802004 0x4>;
reg-names = "unicam", "cmi";
interrupts = <2 7>;
brcm,num-data-lanes = <4>;
status = "disabled";
port {
};
};
i2c1: i2c@7e804000 {
compatible = "brcm,bcm2835-i2c";
reg = <0x7e804000 0x1000>;

View File

@ -0,0 +1,150 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Author: Tom Brautaset <tbrautaset@gmail.com>
*/
/dts-v1/;
#include "bcm4709.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"
#include <dt-bindings/leds/common.h>
/ {
compatible = "asus,rt-ac3200", "brcm,bcm4709", "brcm,bcm4708";
model = "ASUS RT-AC3200";
memory@0 {
reg = <0x00000000 0x08000000>,
<0x88000000 0x08000000>;
device_type = "memory";
};
nvram@1c080000 {
compatible = "brcm,nvram";
reg = <0x1c080000 0x00180000>;
et0macaddr: et0macaddr {
#nvmem-cell-cells = <1>;
};
};
gpio-keys {
compatible = "gpio-keys";
button-reset {
label = "Reset";
linux,code = <KEY_RESTART>;
gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
};
button-wifi {
label = "Wi-Fi";
linux,code = <KEY_RFKILL>;
gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
};
button-wps {
label = "WPS";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
led-power {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_POWER;
gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
};
led-wan-red {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WAN;
gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
};
led-wps {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_WPS;
gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
};
};
};
&gmac0 {
nvmem-cells = <&et0macaddr 0>;
nvmem-cell-names = "mac-address";
};
&gmac1 {
nvmem-cells = <&et0macaddr 1>;
nvmem-cell-names = "mac-address";
};
&gmac2 {
nvmem-cells = <&et0macaddr 2>;
nvmem-cell-names = "mac-address";
};
&nandcs {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
reg = <0x00000000 0x00080000>;
label = "boot";
read-only;
};
partition@80000 {
reg = <0x00080000 0x00180000>;
label = "nvram";
};
partition@200000 {
compatible = "brcm,trx";
reg = <0x00200000 0x07e00000>;
label = "firmware";
};
};
};
&srab {
status = "okay";
ports {
port@0 {
label = "wan";
};
port@1 {
label = "lan1";
};
port@2 {
label = "lan2";
};
port@3 {
label = "lan3";
};
port@4 {
label = "lan4";
};
};
};
&usb2 {
vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
};
&usb3_phy {
status = "okay";
};

View File

@ -13,11 +13,22 @@
nvram@1c080000 {
et0macaddr: et0macaddr {
#nvmem-cell-cells = <1>;
};
};
};
&gmac0 {
nvmem-cells = <&et0macaddr>;
nvmem-cells = <&et0macaddr 0>;
nvmem-cell-names = "mac-address";
};
&gmac1 {
nvmem-cells = <&et0macaddr 1>;
nvmem-cell-names = "mac-address";
};
&gmac2 {
nvmem-cells = <&et0macaddr 2>;
nvmem-cell-names = "mac-address";
};

View File

@ -6,15 +6,13 @@
#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"
/ {
chosen {
bootargs = "earlycon";
};
#include <dt-bindings/leds/common.h>
/ {
memory@0 {
device_type = "memory";
reg = <0x00000000 0x08000000>,
<0x88000000 0x18000000>;
device_type = "memory";
};
nvram@1c080000 {
@ -22,52 +20,13 @@
reg = <0x1c080000 0x00180000>;
};
leds {
compatible = "gpio-leds";
led-power {
label = "white:power";
gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
};
led-wan-red {
label = "red:wan";
gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
};
led-lan {
label = "white:lan";
gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
};
led-usb2 {
label = "white:usb2";
gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port2>;
linux,default-trigger = "usbport";
};
led-usb3 {
label = "white:usb3";
gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port1>, <&xhci_port1>;
linux,default-trigger = "usbport";
};
led-wps {
label = "white:wps";
gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
};
};
gpio-keys {
compatible = "gpio-keys";
button-wps {
label = "WPS";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
button-led {
label = "Backlight";
linux,code = <KEY_BRIGHTNESS_ZERO>;
gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
};
button-reset {
@ -82,16 +41,87 @@
gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
};
button-led {
label = "Backlight";
linux,code = <KEY_BRIGHTNESS_ZERO>;
gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
button-wps {
label = "WPS";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
led-lan {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_LAN;
gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
};
led-power {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_POWER;
gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
};
led-usb2 {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_USB;
function-enumerator = <1>;
gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port2>;
linux,default-trigger = "usbport";
};
led-usb3 {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_USB;
function-enumerator = <2>;
gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port1>, <&xhci_port1>;
linux,default-trigger = "usbport";
};
led-wan-red {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WAN;
gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
};
led-wps {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_WPS;
gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
};
};
};
&nandcs {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
reg = <0x00000000 0x00080000>;
label = "boot";
read-only;
};
partition@80000 {
reg = <0x00080000 0x00180000>;
label = "nvram";
};
partition@200000 {
compatible = "brcm,trx";
reg = <0x00200000 0x07e00000>;
label = "firmware";
};
};
};
&srab {
compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
status = "okay";
ports {
@ -136,28 +166,3 @@
&usb3_phy {
status = "okay";
};
&nandcs {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "boot";
reg = <0x00000000 0x00080000>;
read-only;
};
partition@80000 {
label = "nvram";
reg = <0x00080000 0x00180000>;
};
partition@200000 {
label = "firmware";
reg = <0x00200000 0x07e00000>;
compatible = "brcm,trx";
};
};
};

View File

@ -0,0 +1,156 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Author: Tom Brautaset <tbrautaset@gmail.com>
*/
/dts-v1/;
#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"
#include <dt-bindings/leds/common.h>
/ {
compatible = "asus,rt-ac5300", "brcm,bcm47094", "brcm,bcm4708";
model = "ASUS RT-AC5300";
memory@0 {
reg = <0x00000000 0x08000000>,
<0x88000000 0x18000000>;
device_type = "memory";
};
nvram@1c080000 {
compatible = "brcm,nvram";
reg = <0x1c080000 0x00180000>;
et1macaddr: et1macaddr {
#nvmem-cell-cells = <1>;
};
};
gpio-keys {
compatible = "gpio-keys";
button-reset {
label = "Reset";
linux,code = <KEY_RESTART>;
gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
};
button-wifi {
label = "Wi-Fi";
linux,code = <KEY_RFKILL>;
gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
};
button-wps {
label = "WPS";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
led-lan {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_LAN;
gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
};
led-power {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_POWER;
gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
};
led-wan-red {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WAN;
gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
};
led-wps {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_WPS;
gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
};
};
};
&gmac0 {
nvmem-cells = <&et1macaddr 0>;
nvmem-cell-names = "mac-address";
};
&gmac1 {
nvmem-cells = <&et1macaddr 1>;
nvmem-cell-names = "mac-address";
};
&gmac2 {
nvmem-cells = <&et1macaddr 2>;
nvmem-cell-names = "mac-address";
};
&nandcs {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
reg = <0x00000000 0x00080000>;
label = "boot";
read-only;
};
partition@80000 {
reg = <0x00080000 0x00180000>;
label = "nvram";
};
partition@200000 {
compatible = "brcm,trx";
reg = <0x00200000 0x07e00000>;
label = "firmware";
};
};
};
&srab {
status = "okay";
ports {
port@0 {
label = "lan4";
};
port@1 {
label = "lan3";
};
port@2 {
label = "lan2";
};
port@3 {
label = "lan1";
};
port@4 {
label = "wan";
};
};
};
&usb2 {
vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
};
&usb3_phy {
status = "okay";
};

View File

@ -13,18 +13,40 @@
nvram@1c080000 {
et1macaddr: et1macaddr {
#nvmem-cell-cells = <1>;
};
};
switch {
compatible = "realtek,rtl8365mb";
/* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */
mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
realtek,disable-leds;
dsa,member = <1 0>;
mdio {
compatible = "realtek,smi-mdio";
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@0 {
reg = <0>;
};
ethphy1: ethernet-phy@1 {
reg = <1>;
};
ethphy2: ethernet-phy@2 {
reg = <2>;
};
ethphy3: ethernet-phy@3 {
reg = <3>;
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
@ -68,31 +90,23 @@
};
};
};
mdio {
compatible = "realtek,smi-mdio";
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@0 {
reg = <0>;
};
ethphy1: ethernet-phy@1 {
reg = <1>;
};
ethphy2: ethernet-phy@2 {
reg = <2>;
};
ethphy3: ethernet-phy@3 {
reg = <3>;
};
};
};
};
&gmac0 {
status = "disabled";
};
&gmac1 {
nvmem-cells = <&et1macaddr 0>;
nvmem-cell-names = "mac-address";
};
&gmac2 {
nvmem-cells = <&et1macaddr 1>;
nvmem-cell-names = "mac-address";
};
&srab {
dsa,member = <0 0>;
@ -111,12 +125,3 @@
};
};
};
&gmac0 {
status = "disabled";
};
&gmac1 {
nvmem-cells = <&et1macaddr>;
nvmem-cell-names = "mac-address";
};

View File

@ -9,6 +9,7 @@
#include <linux/dma-mapping.h>
#include <linux/kref.h>
#include <linux/mailbox_client.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
@ -97,8 +98,8 @@ int rpi_firmware_property_list(struct rpi_firmware *fw,
if (size & 3)
return -EINVAL;
buf = dma_alloc_coherent(fw->cl.dev, PAGE_ALIGN(size), &bus_addr,
GFP_ATOMIC);
buf = dma_alloc_coherent(fw->chan->mbox->dev, PAGE_ALIGN(size),
&bus_addr, GFP_ATOMIC);
if (!buf)
return -ENOMEM;
@ -126,7 +127,7 @@ int rpi_firmware_property_list(struct rpi_firmware *fw,
ret = -EINVAL;
}
dma_free_coherent(fw->cl.dev, PAGE_ALIGN(size), buf, bus_addr);
dma_free_coherent(fw->chan->mbox->dev, PAGE_ALIGN(size), buf, bus_addr);
return ret;
}