Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+619 -160
+2
Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.yaml
··· 53 53 - description: BCM4709 based boards 54 54 items: 55 55 - enum: 56 + - asus,rt-ac3200 56 57 - asus,rt-ac87u 57 58 - buffalo,wxr-1900dhp 58 59 - linksys,ea9200 ··· 68 67 items: 69 68 - enum: 70 69 - asus,rt-ac3100 70 + - asus,rt-ac5300 71 71 - asus,rt-ac88u 72 72 - dlink,dir-885l 73 73 - dlink,dir-890l
+30
Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
··· 46 46 - compatible 47 47 - "#clock-cells" 48 48 49 + gpio: 50 + type: object 51 + additionalProperties: false 52 + 53 + properties: 54 + compatible: 55 + const: raspberrypi,firmware-gpio 56 + 57 + gpio-controller: true 58 + 59 + "#gpio-cells": 60 + const: 2 61 + description: 62 + The first cell is the pin number, and the second cell is used to 63 + specify the gpio polarity (GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW). 64 + 65 + gpio-line-names: 66 + minItems: 8 67 + 68 + required: 69 + - compatible 70 + - gpio-controller 71 + - "#gpio-cells" 72 + 49 73 reset: 50 74 type: object 51 75 additionalProperties: false ··· 118 94 firmware_clocks: clocks { 119 95 compatible = "raspberrypi,firmware-clocks"; 120 96 #clock-cells = <1>; 97 + }; 98 + 99 + expgpio: gpio { 100 + compatible = "raspberrypi,firmware-gpio"; 101 + gpio-controller; 102 + #gpio-cells = <2>; 121 103 }; 122 104 123 105 reset: reset {
-30
Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt
··· 1 - Raspberry Pi GPIO expander 2 - 3 - The Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware. The 4 - firmware exposes a mailbox interface that allows the ARM core to control the 5 - GPIO lines on the expander. 6 - 7 - The Raspberry Pi GPIO expander node must be a child node of the Raspberry Pi 8 - firmware node. 9 - 10 - Required properties: 11 - 12 - - compatible : Should be "raspberrypi,firmware-gpio" 13 - - gpio-controller : Marks the device node as a gpio controller 14 - - #gpio-cells : Should be two. The first cell is the pin number, and 15 - the second cell is used to specify the gpio polarity: 16 - 0 = active high 17 - 1 = active low 18 - 19 - Example: 20 - 21 - firmware: firmware-rpi { 22 - compatible = "raspberrypi,bcm2835-firmware"; 23 - mboxes = <&mailbox>; 24 - 25 - expgpio: gpio { 26 - compatible = "raspberrypi,firmware-gpio"; 27 - gpio-controller; 28 - #gpio-cells = <2>; 29 - }; 30 - };
+2
arch/arm/boot/dts/broadcom/Makefile
··· 64 64 bcm47081-luxul-xap-1410.dtb \ 65 65 bcm47081-luxul-xwr-1200.dtb \ 66 66 bcm47081-tplink-archer-c5-v2.dtb \ 67 + bcm4709-asus-rt-ac3200.dtb \ 67 68 bcm4709-asus-rt-ac87u.dtb \ 68 69 bcm4709-buffalo-wxr-1900dhp.dtb \ 69 70 bcm4709-linksys-ea9200.dtb \ ··· 72 71 bcm4709-netgear-r8000.dtb \ 73 72 bcm4709-tplink-archer-c9-v1.dtb \ 74 73 bcm47094-asus-rt-ac3100.dtb \ 74 + bcm47094-asus-rt-ac5300.dtb \ 75 75 bcm47094-asus-rt-ac88u.dtb \ 76 76 bcm47094-dlink-dir-885l.dtb \ 77 77 bcm47094-dlink-dir-890l.dtb \
+29
arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
··· 5 5 #include "bcm283x-rpi-led-deprecated.dtsi" 6 6 #include "bcm283x-rpi-usb-peripheral.dtsi" 7 7 #include "bcm283x-rpi-wifi-bt.dtsi" 8 + #include <dt-bindings/leds/common.h> 8 9 9 10 / { 10 11 compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; ··· 14 13 chosen { 15 14 /* 8250 auxiliary UART instead of pl011 */ 16 15 stdout-path = "serial1:115200n8"; 16 + }; 17 + 18 + cam1_reg: regulator-cam1 { 19 + compatible = "regulator-fixed"; 20 + regulator-name = "cam1-reg"; 21 + enable-active-high; 22 + gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>; 17 23 }; 18 24 19 25 sd_io_1v8_reg: regulator-sd-io-1v8 { ··· 205 197 phy1: ethernet-phy@1 { 206 198 /* No PHY interrupt */ 207 199 reg = <0x1>; 200 + 201 + leds { 202 + #address-cells = <1>; 203 + #size-cells = <0>; 204 + 205 + /* LED1 */ 206 + led@0 { 207 + reg = <0>; 208 + color = <LED_COLOR_ID_GREEN>; 209 + function = LED_FUNCTION_LAN; 210 + default-state = "keep"; 211 + }; 212 + 213 + /* LED2 */ 214 + led@1 { 215 + reg = <1>; 216 + color = <LED_COLOR_ID_AMBER>; 217 + function = LED_FUNCTION_LAN; 218 + default-state = "keep"; 219 + }; 220 + }; 208 221 }; 209 222 }; 210 223
+1
arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts
··· 30 30 31 31 &genet_mdio { 32 32 clock-frequency = <1950000>; 33 + /delete-node/ leds; 33 34 }; 34 35 35 36 &led_pwr {
+33
arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /dts-v1/; 3 + #include <dt-bindings/leds/common.h> 3 4 #include "bcm2711-rpi-cm4.dtsi" 4 5 #include "bcm283x-rpi-led-deprecated.dtsi" 5 6 #include "bcm283x-rpi-usb-host.dtsi" ··· 100 99 101 100 &genet { 102 101 status = "okay"; 102 + }; 103 + 104 + &i2c0_1 { 105 + rtc@51 { 106 + /* Attention: An alarm resets the machine */ 107 + compatible = "nxp,pcf85063a"; 108 + reg = <0x51>; 109 + quartz-load-femtofarads = <7000>; 110 + }; 111 + }; 112 + 113 + &phy1 { 114 + leds { 115 + #address-cells = <1>; 116 + #size-cells = <0>; 117 + 118 + /* LED2 */ 119 + led@1 { 120 + reg = <1>; 121 + color = <LED_COLOR_ID_GREEN>; 122 + function = LED_FUNCTION_LAN; 123 + default-state = "keep"; 124 + }; 125 + 126 + /* LED3 */ 127 + led@2 { 128 + reg = <2>; 129 + color = <LED_COLOR_ID_AMBER>; 130 + function = LED_FUNCTION_LAN; 131 + default-state = "keep"; 132 + }; 133 + }; 103 134 }; 104 135 105 136 &led_act {
+29 -5
arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi
··· 17 17 pcie0 = &pcie0; 18 18 blconfig = &blconfig; 19 19 }; 20 + 21 + i2c0mux: i2c-mux0 { 22 + compatible = "i2c-mux-pinctrl"; 23 + #address-cells = <1>; 24 + #size-cells = <0>; 25 + 26 + i2c-parent = <&i2c0>; 27 + 28 + pinctrl-names = "i2c0", "i2c0-vc"; 29 + pinctrl-0 = <&i2c0_gpio0>; 30 + pinctrl-1 = <&i2c0_gpio44>; 31 + 32 + i2c0_0: i2c@0 { 33 + reg = <0>; 34 + #address-cells = <1>; 35 + #size-cells = <0>; 36 + }; 37 + 38 + i2c0_1: i2c@1 { 39 + reg = <1>; 40 + #address-cells = <1>; 41 + #size-cells = <0>; 42 + }; 43 + }; 20 44 }; 21 45 22 46 &firmware { 23 - firmware_clocks: clocks { 24 - compatible = "raspberrypi,firmware-clocks"; 25 - #clock-cells = <1>; 26 - }; 27 - 28 47 expgpio: gpio { 29 48 compatible = "raspberrypi,firmware-gpio"; 30 49 gpio-controller; ··· 71 52 72 53 &hvs { 73 54 clocks = <&firmware_clocks 4>; 55 + }; 56 + 57 + &i2c0 { 58 + /delete-property/ pinctrl-names; 59 + /delete-property/ pinctrl-0; 74 60 }; 75 61 76 62 &rmem {
+8
arch/arm/boot/dts/broadcom/bcm2711.dtsi
··· 1114 1114 #address-cells = <2>; 1115 1115 }; 1116 1116 1117 + &csi0 { 1118 + interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>; 1119 + }; 1120 + 1121 + &csi1 { 1122 + interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; 1123 + }; 1124 + 1117 1125 &cma { 1118 1126 /* 1119 1127 * arm64 reserves the CMA by default somewhere in ZONE_DMA32,
-7
arch/arm/boot/dts/broadcom/bcm2835-rpi-common.dtsi
··· 7 7 8 8 #include <dt-bindings/power/raspberrypi-power.h> 9 9 10 - &firmware { 11 - firmware_clocks: clocks { 12 - compatible = "raspberrypi,firmware-clocks"; 13 - #clock-cells = <1>; 14 - }; 15 - }; 16 - 17 10 &hdmi { 18 11 clocks = <&firmware_clocks 9>, 19 12 <&firmware_clocks 13>;
+19 -4
arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
··· 4 4 soc { 5 5 firmware: firmware { 6 6 compatible = "raspberrypi,bcm2835-firmware", "simple-mfd"; 7 - #address-cells = <1>; 8 - #size-cells = <1>; 9 - 10 7 mboxes = <&mailbox>; 11 - dma-ranges; 8 + 9 + firmware_clocks: clocks { 10 + compatible = "raspberrypi,firmware-clocks"; 11 + #clock-cells = <1>; 12 + }; 12 13 }; 13 14 14 15 power: power { ··· 24 23 interrupts = <0 2>; 25 24 }; 26 25 }; 26 + }; 27 + 28 + &csi0 { 29 + clocks = <&clocks BCM2835_CLOCK_CAM0>, 30 + <&firmware_clocks 4>; 31 + clock-names = "lp", "vpu"; 32 + power-domains = <&power RPI_POWER_DOMAIN_UNICAM0>; 33 + }; 34 + 35 + &csi1 { 36 + clocks = <&clocks BCM2835_CLOCK_CAM1>, 37 + <&firmware_clocks 4>; 38 + clock-names = "lp", "vpu"; 39 + power-domains = <&power RPI_POWER_DOMAIN_UNICAM1>; 27 40 }; 28 41 29 42 &gpio {
+24
arch/arm/boot/dts/broadcom/bcm283x.dtsi
··· 454 454 status = "disabled"; 455 455 }; 456 456 457 + csi0: csi@7e800000 { 458 + compatible = "brcm,bcm2835-unicam"; 459 + reg = <0x7e800000 0x800>, 460 + <0x7e802000 0x4>; 461 + reg-names = "unicam", "cmi"; 462 + interrupts = <2 6>; 463 + brcm,num-data-lanes = <2>; 464 + status = "disabled"; 465 + port { 466 + }; 467 + }; 468 + 469 + csi1: csi@7e801000 { 470 + compatible = "brcm,bcm2835-unicam"; 471 + reg = <0x7e801000 0x800>, 472 + <0x7e802004 0x4>; 473 + reg-names = "unicam", "cmi"; 474 + interrupts = <2 7>; 475 + brcm,num-data-lanes = <4>; 476 + status = "disabled"; 477 + port { 478 + }; 479 + }; 480 + 457 481 i2c1: i2c@7e804000 { 458 482 compatible = "brcm,bcm2835-i2c"; 459 483 reg = <0x7e804000 0x1000>;
+150
arch/arm/boot/dts/broadcom/bcm4709-asus-rt-ac3200.dts
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 2 + /* 3 + * Author: Tom Brautaset <tbrautaset@gmail.com> 4 + */ 5 + 6 + /dts-v1/; 7 + 8 + #include "bcm4709.dtsi" 9 + #include "bcm5301x-nand-cs0-bch8.dtsi" 10 + 11 + #include <dt-bindings/leds/common.h> 12 + 13 + / { 14 + compatible = "asus,rt-ac3200", "brcm,bcm4709", "brcm,bcm4708"; 15 + model = "ASUS RT-AC3200"; 16 + 17 + memory@0 { 18 + reg = <0x00000000 0x08000000>, 19 + <0x88000000 0x08000000>; 20 + device_type = "memory"; 21 + }; 22 + 23 + nvram@1c080000 { 24 + compatible = "brcm,nvram"; 25 + reg = <0x1c080000 0x00180000>; 26 + 27 + et0macaddr: et0macaddr { 28 + #nvmem-cell-cells = <1>; 29 + }; 30 + }; 31 + 32 + gpio-keys { 33 + compatible = "gpio-keys"; 34 + 35 + button-reset { 36 + label = "Reset"; 37 + linux,code = <KEY_RESTART>; 38 + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; 39 + }; 40 + 41 + button-wifi { 42 + label = "Wi-Fi"; 43 + linux,code = <KEY_RFKILL>; 44 + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; 45 + }; 46 + 47 + button-wps { 48 + label = "WPS"; 49 + linux,code = <KEY_WPS_BUTTON>; 50 + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; 51 + }; 52 + }; 53 + 54 + leds { 55 + compatible = "gpio-leds"; 56 + 57 + led-power { 58 + color = <LED_COLOR_ID_WHITE>; 59 + function = LED_FUNCTION_POWER; 60 + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; 61 + linux,default-trigger = "default-on"; 62 + }; 63 + 64 + led-wan-red { 65 + color = <LED_COLOR_ID_RED>; 66 + function = LED_FUNCTION_WAN; 67 + gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>; 68 + }; 69 + 70 + led-wps { 71 + color = <LED_COLOR_ID_WHITE>; 72 + function = LED_FUNCTION_WPS; 73 + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; 74 + }; 75 + }; 76 + }; 77 + 78 + &gmac0 { 79 + nvmem-cells = <&et0macaddr 0>; 80 + nvmem-cell-names = "mac-address"; 81 + }; 82 + 83 + &gmac1 { 84 + nvmem-cells = <&et0macaddr 1>; 85 + nvmem-cell-names = "mac-address"; 86 + }; 87 + 88 + &gmac2 { 89 + nvmem-cells = <&et0macaddr 2>; 90 + nvmem-cell-names = "mac-address"; 91 + }; 92 + 93 + &nandcs { 94 + partitions { 95 + compatible = "fixed-partitions"; 96 + #address-cells = <1>; 97 + #size-cells = <1>; 98 + 99 + partition@0 { 100 + reg = <0x00000000 0x00080000>; 101 + label = "boot"; 102 + read-only; 103 + }; 104 + 105 + partition@80000 { 106 + reg = <0x00080000 0x00180000>; 107 + label = "nvram"; 108 + }; 109 + 110 + partition@200000 { 111 + compatible = "brcm,trx"; 112 + reg = <0x00200000 0x07e00000>; 113 + label = "firmware"; 114 + }; 115 + }; 116 + }; 117 + 118 + &srab { 119 + status = "okay"; 120 + 121 + ports { 122 + port@0 { 123 + label = "wan"; 124 + }; 125 + 126 + port@1 { 127 + label = "lan1"; 128 + }; 129 + 130 + port@2 { 131 + label = "lan2"; 132 + }; 133 + 134 + port@3 { 135 + label = "lan3"; 136 + }; 137 + 138 + port@4 { 139 + label = "lan4"; 140 + }; 141 + }; 142 + }; 143 + 144 + &usb2 { 145 + vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; 146 + }; 147 + 148 + &usb3_phy { 149 + status = "okay"; 150 + };
+12 -1
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dts
··· 13 13 14 14 nvram@1c080000 { 15 15 et0macaddr: et0macaddr { 16 + #nvmem-cell-cells = <1>; 16 17 }; 17 18 }; 18 19 }; 19 20 20 21 &gmac0 { 21 - nvmem-cells = <&et0macaddr>; 22 + nvmem-cells = <&et0macaddr 0>; 23 + nvmem-cell-names = "mac-address"; 24 + }; 25 + 26 + &gmac1 { 27 + nvmem-cells = <&et0macaddr 1>; 28 + nvmem-cell-names = "mac-address"; 29 + }; 30 + 31 + &gmac2 { 32 + nvmem-cells = <&et0macaddr 2>; 22 33 nvmem-cell-names = "mac-address"; 23 34 };
+83 -78
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
··· 6 6 #include "bcm47094.dtsi" 7 7 #include "bcm5301x-nand-cs0-bch8.dtsi" 8 8 9 - / { 10 - chosen { 11 - bootargs = "earlycon"; 12 - }; 9 + #include <dt-bindings/leds/common.h> 13 10 11 + / { 14 12 memory@0 { 15 - device_type = "memory"; 16 13 reg = <0x00000000 0x08000000>, 17 14 <0x88000000 0x18000000>; 15 + device_type = "memory"; 18 16 }; 19 17 20 18 nvram@1c080000 { ··· 20 22 reg = <0x1c080000 0x00180000>; 21 23 }; 22 24 23 - leds { 24 - compatible = "gpio-leds"; 25 - 26 - led-power { 27 - label = "white:power"; 28 - gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; 29 - linux,default-trigger = "default-on"; 30 - }; 31 - 32 - led-wan-red { 33 - label = "red:wan"; 34 - gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>; 35 - }; 36 - 37 - led-lan { 38 - label = "white:lan"; 39 - gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; 40 - }; 41 - 42 - led-usb2 { 43 - label = "white:usb2"; 44 - gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>; 45 - trigger-sources = <&ehci_port2>; 46 - linux,default-trigger = "usbport"; 47 - }; 48 - 49 - led-usb3 { 50 - label = "white:usb3"; 51 - gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; 52 - trigger-sources = <&ehci_port1>, <&xhci_port1>; 53 - linux,default-trigger = "usbport"; 54 - }; 55 - 56 - led-wps { 57 - label = "white:wps"; 58 - gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>; 59 - }; 60 - }; 61 - 62 25 gpio-keys { 63 26 compatible = "gpio-keys"; 64 27 65 - button-wps { 66 - label = "WPS"; 67 - linux,code = <KEY_WPS_BUTTON>; 68 - gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; 28 + button-led { 29 + label = "Backlight"; 30 + linux,code = <KEY_BRIGHTNESS_ZERO>; 31 + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; 69 32 }; 70 33 71 34 button-reset { ··· 41 82 gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; 42 83 }; 43 84 44 - button-led { 45 - label = "Backlight"; 46 - linux,code = <KEY_BRIGHTNESS_ZERO>; 47 - gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; 85 + button-wps { 86 + label = "WPS"; 87 + linux,code = <KEY_WPS_BUTTON>; 88 + gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; 89 + }; 90 + }; 91 + 92 + leds { 93 + compatible = "gpio-leds"; 94 + 95 + led-lan { 96 + color = <LED_COLOR_ID_WHITE>; 97 + function = LED_FUNCTION_LAN; 98 + gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; 99 + }; 100 + 101 + led-power { 102 + color = <LED_COLOR_ID_WHITE>; 103 + function = LED_FUNCTION_POWER; 104 + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; 105 + linux,default-trigger = "default-on"; 106 + }; 107 + 108 + led-usb2 { 109 + color = <LED_COLOR_ID_WHITE>; 110 + function = LED_FUNCTION_USB; 111 + function-enumerator = <1>; 112 + gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>; 113 + trigger-sources = <&ehci_port2>; 114 + linux,default-trigger = "usbport"; 115 + }; 116 + 117 + led-usb3 { 118 + color = <LED_COLOR_ID_WHITE>; 119 + function = LED_FUNCTION_USB; 120 + function-enumerator = <2>; 121 + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; 122 + trigger-sources = <&ehci_port1>, <&xhci_port1>; 123 + linux,default-trigger = "usbport"; 124 + }; 125 + 126 + led-wan-red { 127 + color = <LED_COLOR_ID_RED>; 128 + function = LED_FUNCTION_WAN; 129 + gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>; 130 + }; 131 + 132 + led-wps { 133 + color = <LED_COLOR_ID_WHITE>; 134 + function = LED_FUNCTION_WPS; 135 + gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>; 136 + }; 137 + }; 138 + }; 139 + 140 + &nandcs { 141 + partitions { 142 + compatible = "fixed-partitions"; 143 + #address-cells = <1>; 144 + #size-cells = <1>; 145 + 146 + partition@0 { 147 + reg = <0x00000000 0x00080000>; 148 + label = "boot"; 149 + read-only; 150 + }; 151 + 152 + partition@80000 { 153 + reg = <0x00080000 0x00180000>; 154 + label = "nvram"; 155 + }; 156 + 157 + partition@200000 { 158 + compatible = "brcm,trx"; 159 + reg = <0x00200000 0x07e00000>; 160 + label = "firmware"; 48 161 }; 49 162 }; 50 163 }; 51 164 52 165 &srab { 53 - compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab"; 54 166 status = "okay"; 55 167 56 168 ports { ··· 165 135 166 136 &usb3_phy { 167 137 status = "okay"; 168 - }; 169 - 170 - &nandcs { 171 - partitions { 172 - compatible = "fixed-partitions"; 173 - #address-cells = <1>; 174 - #size-cells = <1>; 175 - 176 - partition@0 { 177 - label = "boot"; 178 - reg = <0x00000000 0x00080000>; 179 - read-only; 180 - }; 181 - 182 - partition@80000 { 183 - label = "nvram"; 184 - reg = <0x00080000 0x00180000>; 185 - }; 186 - 187 - partition@200000 { 188 - label = "firmware"; 189 - reg = <0x00200000 0x07e00000>; 190 - compatible = "brcm,trx"; 191 - }; 192 - }; 193 138 };
+156
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac5300.dts
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 2 + /* 3 + * Author: Tom Brautaset <tbrautaset@gmail.com> 4 + */ 5 + 6 + /dts-v1/; 7 + 8 + #include "bcm47094.dtsi" 9 + #include "bcm5301x-nand-cs0-bch8.dtsi" 10 + 11 + #include <dt-bindings/leds/common.h> 12 + 13 + / { 14 + compatible = "asus,rt-ac5300", "brcm,bcm47094", "brcm,bcm4708"; 15 + model = "ASUS RT-AC5300"; 16 + 17 + memory@0 { 18 + reg = <0x00000000 0x08000000>, 19 + <0x88000000 0x18000000>; 20 + device_type = "memory"; 21 + }; 22 + 23 + nvram@1c080000 { 24 + compatible = "brcm,nvram"; 25 + reg = <0x1c080000 0x00180000>; 26 + 27 + et1macaddr: et1macaddr { 28 + #nvmem-cell-cells = <1>; 29 + }; 30 + }; 31 + 32 + gpio-keys { 33 + compatible = "gpio-keys"; 34 + 35 + button-reset { 36 + label = "Reset"; 37 + linux,code = <KEY_RESTART>; 38 + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; 39 + }; 40 + 41 + button-wifi { 42 + label = "Wi-Fi"; 43 + linux,code = <KEY_RFKILL>; 44 + gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; 45 + }; 46 + 47 + button-wps { 48 + label = "WPS"; 49 + linux,code = <KEY_WPS_BUTTON>; 50 + gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; 51 + }; 52 + }; 53 + 54 + leds { 55 + compatible = "gpio-leds"; 56 + 57 + led-lan { 58 + color = <LED_COLOR_ID_WHITE>; 59 + function = LED_FUNCTION_LAN; 60 + gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; 61 + }; 62 + 63 + led-power { 64 + color = <LED_COLOR_ID_WHITE>; 65 + function = LED_FUNCTION_POWER; 66 + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; 67 + linux,default-trigger = "default-on"; 68 + }; 69 + 70 + led-wan-red { 71 + color = <LED_COLOR_ID_RED>; 72 + function = LED_FUNCTION_WAN; 73 + gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>; 74 + }; 75 + 76 + led-wps { 77 + color = <LED_COLOR_ID_WHITE>; 78 + function = LED_FUNCTION_WPS; 79 + gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>; 80 + }; 81 + }; 82 + }; 83 + 84 + &gmac0 { 85 + nvmem-cells = <&et1macaddr 0>; 86 + nvmem-cell-names = "mac-address"; 87 + }; 88 + 89 + &gmac1 { 90 + nvmem-cells = <&et1macaddr 1>; 91 + nvmem-cell-names = "mac-address"; 92 + }; 93 + 94 + &gmac2 { 95 + nvmem-cells = <&et1macaddr 2>; 96 + nvmem-cell-names = "mac-address"; 97 + }; 98 + 99 + &nandcs { 100 + partitions { 101 + compatible = "fixed-partitions"; 102 + #address-cells = <1>; 103 + #size-cells = <1>; 104 + 105 + partition@0 { 106 + reg = <0x00000000 0x00080000>; 107 + label = "boot"; 108 + read-only; 109 + }; 110 + 111 + partition@80000 { 112 + reg = <0x00080000 0x00180000>; 113 + label = "nvram"; 114 + }; 115 + 116 + partition@200000 { 117 + compatible = "brcm,trx"; 118 + reg = <0x00200000 0x07e00000>; 119 + label = "firmware"; 120 + }; 121 + }; 122 + }; 123 + 124 + &srab { 125 + status = "okay"; 126 + 127 + ports { 128 + port@0 { 129 + label = "lan4"; 130 + }; 131 + 132 + port@1 { 133 + label = "lan3"; 134 + }; 135 + 136 + port@2 { 137 + label = "lan2"; 138 + }; 139 + 140 + port@3 { 141 + label = "lan1"; 142 + }; 143 + 144 + port@4 { 145 + label = "wan"; 146 + }; 147 + }; 148 + }; 149 + 150 + &usb2 { 151 + vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; 152 + }; 153 + 154 + &usb3_phy { 155 + status = "okay"; 156 + };
+37 -32
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts
··· 13 13 14 14 nvram@1c080000 { 15 15 et1macaddr: et1macaddr { 16 + #nvmem-cell-cells = <1>; 16 17 }; 17 18 }; 18 19 19 20 switch { 20 21 compatible = "realtek,rtl8365mb"; 21 - /* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */ 22 22 mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>; 23 23 mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>; 24 24 reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>; 25 25 realtek,disable-leds; 26 26 dsa,member = <1 0>; 27 + 28 + mdio { 29 + compatible = "realtek,smi-mdio"; 30 + #address-cells = <1>; 31 + #size-cells = <0>; 32 + 33 + ethphy0: ethernet-phy@0 { 34 + reg = <0>; 35 + }; 36 + 37 + ethphy1: ethernet-phy@1 { 38 + reg = <1>; 39 + }; 40 + 41 + ethphy2: ethernet-phy@2 { 42 + reg = <2>; 43 + }; 44 + 45 + ethphy3: ethernet-phy@3 { 46 + reg = <3>; 47 + }; 48 + }; 27 49 28 50 ports { 29 51 #address-cells = <1>; ··· 90 68 }; 91 69 }; 92 70 }; 93 - 94 - mdio { 95 - compatible = "realtek,smi-mdio"; 96 - #address-cells = <1>; 97 - #size-cells = <0>; 98 - 99 - ethphy0: ethernet-phy@0 { 100 - reg = <0>; 101 - }; 102 - 103 - ethphy1: ethernet-phy@1 { 104 - reg = <1>; 105 - }; 106 - 107 - ethphy2: ethernet-phy@2 { 108 - reg = <2>; 109 - }; 110 - 111 - ethphy3: ethernet-phy@3 { 112 - reg = <3>; 113 - }; 114 - }; 115 71 }; 72 + }; 73 + 74 + &gmac0 { 75 + status = "disabled"; 76 + }; 77 + 78 + &gmac1 { 79 + nvmem-cells = <&et1macaddr 0>; 80 + nvmem-cell-names = "mac-address"; 81 + }; 82 + 83 + &gmac2 { 84 + nvmem-cells = <&et1macaddr 1>; 85 + nvmem-cell-names = "mac-address"; 116 86 }; 117 87 118 88 &srab { ··· 124 110 }; 125 111 }; 126 112 }; 127 - }; 128 - 129 - &gmac0 { 130 - status = "disabled"; 131 - }; 132 - 133 - &gmac1 { 134 - nvmem-cells = <&et1macaddr>; 135 - nvmem-cell-names = "mac-address"; 136 113 };
+4 -3
drivers/firmware/raspberrypi.c
··· 9 9 #include <linux/dma-mapping.h> 10 10 #include <linux/kref.h> 11 11 #include <linux/mailbox_client.h> 12 + #include <linux/mailbox_controller.h> 12 13 #include <linux/module.h> 13 14 #include <linux/of.h> 14 15 #include <linux/of_platform.h> ··· 98 97 if (size & 3) 99 98 return -EINVAL; 100 99 101 - buf = dma_alloc_coherent(fw->cl.dev, PAGE_ALIGN(size), &bus_addr, 102 - GFP_ATOMIC); 100 + buf = dma_alloc_coherent(fw->chan->mbox->dev, PAGE_ALIGN(size), 101 + &bus_addr, GFP_ATOMIC); 103 102 if (!buf) 104 103 return -ENOMEM; 105 104 ··· 127 126 ret = -EINVAL; 128 127 } 129 128 130 - dma_free_coherent(fw->cl.dev, PAGE_ALIGN(size), buf, bus_addr); 129 + dma_free_coherent(fw->chan->mbox->dev, PAGE_ALIGN(size), buf, bus_addr); 131 130 132 131 return ret; 133 132 }