Commit Graph

17 Commits

Author SHA1 Message Date
Linus Walleij
bbdccf0f4e ARM64: dts: bcm4908: Add BCMBCA peripherals
All the BCMBCA SoCs share a set of peripherals at 0xff800000,
albeit at slightly varying memory locations on the bus and
with varying IRQ assignments. ARM64 SoCs have additional
peripherals at 0xff858000, we extend the peripheral bus
range to 0x400000 to cover this area.

Add the watchdog, remaining GPIO blocks, RNG, and DMA blocks
for the BCM4908 based on the vendor files 4908_map_part.h
and 4908_intr.h from the "bcmopen-consumer" code drop.

This SoC has up to 320 possible GPIOs due to having 10
registers with 32 GPIOs in each available.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Link: https://lore.kernel.org/r/20250512-bcmbca-peripherals-arm-v3-9-86f97ab4326f@linaro.org
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2025-06-09 10:10:29 -07:00
Sam Edwards
95d56dfaa0 arm64: dts: broadcom: bcmbca: bcm4908: Protect cpu-release-addr
The `cpu-release-addr` property is relevant only when the "spin-table"
enable method is used. It is the physical address where the bootloader
expects Linux to write the secondary CPU entry point's physical address.
On this platform, only the CFE bootloader uses this method: U-Boot uses
PSCI instead.

CFE actually walks the FDT to learn this address, so we're free to put
it wherever we want. We only need to make sure that it goes in a
reserved-memory block so that writing to it during early boot does not
risk conflicting with an unrelated memory allocation: this was not done.

Since the previous patch reserved the first page of memory for CFE's
secondary-CPU init stub, which is actually much smaller than a page,
just put this address at the end of that page and it shall be so
protected.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Link: https://lore.kernel.org/r/20241005050155.61103-3-CFSworks@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2024-12-17 11:39:21 -08:00
Sam Edwards
cef313931d arm64: dts: broadcom: bcmbca: bcm4908: Reserve CFE stub area
The CFE bootloader places a stub program in the first page of physical
memory to hold the secondary CPUs until the boot CPU writes the release
address, but does not splice a /reserved-memory node into the FDT to
protect it. If Linux overwrites this program before execution reaches
smp_prepare_cpus(), the secondary CPUs may become inaccessible.

This is only a problem with CFE, and then only until the secondary CPUs
are brought online. Ideally, there would be some hypothetical mechanism
we could use to indicate that this area of memory is sensitive only
during boot. But as there is none, and since it is such a small amount
of memory, it is easiest to reserve it unconditionally.

Therefore, add a /reserved-memory node to bcm4908.dtsi to protect the
first 4KiB of physical memory.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Link: https://lore.kernel.org/r/20241005050155.61103-2-CFSworks@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2024-12-17 11:39:20 -08:00
Rafał Miłecki
328ad44c52 arm64: dts: broadcom: bcmbca: bcm4908: set brcm,wp-not-connected
Every described BCM4908 board has WP pin not connected. This caused
problems for drivers since day 0 but there was no property to describe
that properly. Projects like OpenWrt were modifying Linux driver to deal
with it.

It's not clear if that is hardware limitation or just reference design
being copied over and over but this applies to all known / supported
BCM4908 boards. Handle it by marking WP as not connected by default.

Fixes: 2961f69f15 ("arm64: dts: broadcom: add BCM4908 and Asus GT-AC5300 early DTS files")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20240328093710.28206-1-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2024-04-02 13:41:01 -07:00
Linus Torvalds
78c3925c04 ARM: late SoC changes for 6.9
These are changes that for some reason ended up not making it into the
 first four branches but that should still make it into 6.9:
 
  - A rework of the omap clock support that touches both drivers and
    device tree files
 
  - The reset controller branch changes that had a dependency on late
    bugfixes. Merging them here avoids a backmerge of 6.8-rc5 into the
    drivers branch
 
  - The RISC-V/starfive, RISC-V/microchip and ARM/Broadcom devicetree
    changes that got delayed and needed some extra time in linux-next
    for wider testing.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmX5vYcACgkQYKtH/8kJ
 UiemkhAAu2lYNpttx+qVlEzQvPKyID5Y+E0cVRmM5e79/fOumNomSzFwtKztCbz2
 PV1CHwmDYANKsI8tl91PAe8PzD+9Er+8xa6YYVSMG5bLC2aGdF4k5hzMnRmfhlDe
 uRT/9iNH0w+S1p44+wXI9Y++uZhxJtCqa6kytxybl6YrG2/l3Wm0PVcMAD/MWT1l
 OULRg5gv3+7qHLKE0ffd0J7I7zCvKA5cEqnieGSO8+k1jsOE3BvgLttfPUuUsi3x
 8yWAJ2cEv293Cao8x8rw39TYIHQOznLMNzK/GCIemL4k9TafbGbuVPUGQZ6oX1SQ
 +/biiUV8CMLzanw2Ds7piQ/4J8EoJjh7jCf9pETORlHLaCMQaYUk4I2KnBWmjxuO
 QBy6Py68EkyT1zv7YFkpdxeABkwkrObMmVsjfyltd2lCF6oC+xbIw5IOVPgnUiTc
 WANL3y+hS5zv+ABmpkRhDPe9KrcoO95sJgGaoMPatwD1/2JkdV7EkvbXWdnipb1w
 REYk4xuRlJcAgyjc5nrQXR8FuPX63c08NFkOw+AInFV8ipyH+8nkesb0w54aegsR
 Tihhl0WUxk/e9FLFVlPiYRNdyqOb2HKteRwRxsA1LqqcWdpYjplBrkZhHb3+ESnP
 lQaQ7AtZRoIjwsImYen3M2W1cFS214BAqoonLLYSd0ponCB05Ng=
 =IzoE
 -----END PGP SIGNATURE-----

Merge tag 'soc-late-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull more ARM SoC updates from Arnd Bergmann:
 "These are changes that for some reason ended up not making it into the
  first four branches but that should still make it into 6.9:

   - A rework of the omap clock support that touches both drivers and
     device tree files

   - The reset controller branch changes that had a dependency on late
     bugfixes. Merging them here avoids a backmerge of 6.8-rc5 into the
     drivers branch

   - The RISC-V/starfive, RISC-V/microchip and ARM/Broadcom devicetree
     changes that got delayed and needed some extra time in linux-next
     for wider testing"

* tag 'soc-late-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (31 commits)
  soc: fsl: dpio: fix kcalloc() argument order
  bus: ts-nbus: Improve error reporting
  bus: ts-nbus: Convert to atomic pwm API
  riscv: dts: starfive: jh7110: Add camera subsystem nodes
  ARM: bcm: stop selecing CONFIG_TICK_ONESHOT
  ARM: dts: omap3: Update clksel clocks to use reg instead of ti,bit-shift
  ARM: dts: am3: Update clksel clocks to use reg instead of ti,bit-shift
  clk: ti: Improve clksel clock bit parsing for reg property
  clk: ti: Handle possible address in the node name
  dt-bindings: pwm: opencores: Add compatible for StarFive JH8100
  dt-bindings: riscv: cpus: reg matches hart ID
  reset: Instantiate reset GPIO controller for shared reset-gpios
  reset: gpio: Add GPIO-based reset controller
  cpufreq: do not open-code of_phandle_args_equal()
  of: Add of_phandle_args_equal() helper
  reset: simple: add support for Sophgo SG2042
  dt-bindings: reset: sophgo: support SG2042
  riscv: dts: microchip: add specific compatible for mpfs pdma
  riscv: dts: microchip: add missing CAN bus clocks
  ARM: brcmstb: Add debug UART entry for 74165
  ...
2024-03-19 11:57:26 -07:00
William Zhang
5319667c5e arm64: dts: broadcom: bcmbca: Add NAND controller node
Add support for Broadcom STB NAND controller in BCMBCA ARMv8 chip dts
files.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/linux-mtd/20240223034758.13753-9-william.zhang@broadcom.com
2024-03-15 00:04:34 +01:00
Rafał Miłecki
27058b95fb arm64: dts: broadcom: bcmbca: bcm4908: drop invalid switch cells
Ethernet switch does not have addressable subnodes.

This fixes:
arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dtb: ethernet-switch@0: '#address-cells', '#size-cells' do not match any of the regexes: 'pinctrl-[0-9]+'
        from schema $id: http://devicetree.org/schemas/net/dsa/brcm,sf2.yaml#

Fixes: 527a3ac9bd ("arm64: dts: broadcom: bcm4908: describe internal switch")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20240111115636.12095-1-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2024-01-29 10:43:10 -08:00
Krzysztof Kozlowski
a3660e59a9 arm64: dts: broadcom: add missing space before {
Add missing whitespace between node name/label and opening {.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230705150108.293999-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2023-07-12 10:20:13 -07:00
Krzysztof Kozlowski
0709e55ed1 arm64: dts: broadcom: add missing cache properties
As all level 2 and level 3 caches are unified, add required
cache-unified properties to fix warnings like:

  bcm94908.dtb: l2-cache0: 'cache-unified' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Link: https://lore.kernel.org/r/20230421223208.115555-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2023-05-08 11:23:53 -07:00
Rafał Miłecki
477cad715d arm64: dts: broadcom: bcmbca: bcm4908: add on-SoC USB ports
BCM4908 has 3 USB controllers each with 2 USB ports. Home routers often
have LEDs indicating state of selected USB ports. Describe those SoC USB
ports to allow using them as LED trigger sources.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/all/20230228144520.21816-1-zajec5@gmail.com/
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2023-03-14 14:20:51 -07:00
Rafał Miłecki
f16a8294dd arm64: dts: broadcom: bcmbca: bcm4908: fix procmon nodename
This fixes:
arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: syscon@280000: $nodename:0: 'syscon@280000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
        From schema: schemas/simple-bus.yaml

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/all/20230228144400.21689-3-zajec5@gmail.com/
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2023-03-14 14:15:16 -07:00
Rafał Miłecki
5cca024494 arm64: dts: broadcom: bcmbca: bcm4908: fix NAND interrupt name
This fixes:
arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: interrupt-names:0: 'nand_ctlrdy' was expected
        From schema: Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: Unevaluated properties are not allowed ('interrupt-names' was unexpected)
        From schema: Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/all/20230228144400.21689-1-zajec5@gmail.com/
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2023-03-14 14:15:06 -07:00
William Zhang
f5d83b714e arm64: dts: broadcom: bcmbca: Add spi controller node
Add support for HSSPI controller in ARMv8 chip dts files.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Link: https://lore.kernel.org/r/20230207065826.285013-5-william.zhang@broadcom.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2023-03-14 14:06:52 -07:00
Pierre Gondois
e567e58d68 arm64: dts: Update cache properties for broadcom
The DeviceTree Specification v0.3 specifies that the cache node
'compatible' and 'cache-level' properties are 'required'. Cf.
s3.8 Multi-level and Shared Cache Nodes
The 'cache-unified' property should be present if one of the
properties for unified cache is present ('cache-size', ...).

Update the Device Trees accordingly.

Acked-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Link: https://lore.kernel.org/r/20221122163208.3810985-3-pierre.gondois@arm.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-11-28 15:37:41 -08:00
Rafał Miłecki
68064196cf arm64: dts: broadcom: bcmbca: bcm4908: add TWD block timer
BCM4908 TWD contains block with 4 timers. Add binding for it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20221103105316.21294-1-zajec5@gmail.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-11-09 10:25:31 -08:00
Arnd Bergmann
32c3d47fd7 This pull request contains Broadcom ARM64-based SoC changes for 6.1,
please pull the following:
 
 - Rafal adds the BCM4908 LED controller node and describes all 32 LED
 pins, he also adds support for the Asus GC-AC5300 LEDs
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmMfeXkACgkQh9CWnEQH
 BwS3XRAA1UyWHE6AqYSsLWcllNBxvbgJ9Fm5PqyY2+ZvMcHL3Pt5R0drY9tkQRfx
 ohiZmNoMxRgoVi79DGunVp9MWHtYzAyjoN8TOvS2er3zfEGBqoLTxPzNMDqcuX7y
 rtnFcrRAcr501gqqQ/ueaFxNDiIUY9aa48aPs7m7Tvqk9waKGtSDJ/y07+Bc/MYX
 RlsjKBkElfU8E/kcUQlGxGwEfaZ3V2nZtagf1En/BYtZ3X16T/zHJozu9TcI9YxQ
 yRxs7erW1GMOnrkVrlQFCH2TojhO6Ec5NtgSb2Ix9Bk80bU1l2hda6mm/lRFi81A
 AaJE1beJzspuQwHgS8zhKNwQNSzTptROkmzL5Ema7TKab72E9Oyp5cmTF5GaMskH
 BGunAghmi5SDU4Xz1sr5NnPSvnYwi/MdJvlPTSbzMGTuMk2Eze4vH5lAzsgePBr+
 Uw9B+nI/j6JIzQCrzzNZrr/M5i0PItuXvNO/ia8YbFnmQo4BvYwK4tE7G0i7kTmn
 YP428RYM7UontSBdEcJi/2P6JHoJvyxisbaMPgdBw8GP+qUgb8hiH/w9qJvIhcFX
 WfYZlILSKLbtnDob4o9HjN46W5IH5AbwcVy+Ax7qGA1l1yxxXjPB2CHJFtDCSpzK
 MfVoiUBqzdn/gZ68WQZbXuDchIBZG/FxFmr8zRyIiiQfWkHnHYY=
 =+IBl
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmMjhSAACgkQmmx57+YA
 GNn7zw//ezQSo9ofE2JAQWzCs3d+3S3QAFqCz/PoBCmFS71Yoi59BoVD3ghVUdyB
 KZMEhWPgHa+MHJWHOqNM4TBbEF8J6MZNXIB/nrxG2L8h4QYmN995jlyQSsHX8yGd
 NEg9bwcTZ4lf5a2VZgzVgseNS3K4tOr0dGyIY68N1fmg4HaADbycYbOJjICxUDyL
 RNpghhJm3IIc/iwSS+kiY8Zny1MZnGj35xmvbzKOLek6DE6WeCZshP01MZD9BPJ2
 VAOQjHQ2z8XUjoHWEmkcl7HOnC6IILgdJwaRmrS8dHR1nIdN8n3J9ldpjdtCDXtD
 A+wjfhXsSg1O9yRfXfNnEXhPYma3lJMHllT266fas8344tXrrp2xmvIOI96UP+Um
 VhWsjkrTAXKBe26L5tkq5XEmgdmzclFPmn7gUzoGu7Ho5G2HvSZXTqng3OkGKlj/
 k6sIH+W56Ew0HfBkwwoZGiixp8YBepQG59jTDeOsosI4783k8Iwk8dZByxnlUH5o
 eHlSbmbbz5LpySMfanwbGSwoNUBmlG9n0OoNufzsQDNwsWPnl+iMH6JlyF/9qeDs
 yPDXZ3WAON7Mua6cFgeBDNyUOlw5uHZvfy1Lhx5MDwjsC05p+bd6At2dpjYHWTja
 t019ijZ1iD4eZqhF1Hd+tkFcI+xmOfIKeupQEG/vV5PEBktgEWk=
 =ybyG
 -----END PGP SIGNATURE-----

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

This pull request contains Broadcom ARM64-based SoC changes for 6.1,
please pull the following:

- Rafal adds the BCM4908 LED controller node and describes all 32 LED
pins, he also adds support for the Asus GC-AC5300 LEDs

* tag 'arm-soc/for-6.1/devicetree-arm64' of https://github.com/Broadcom/stblinux:
  arm64: dts: broadcom: bcm4908: add Asus GT-AC5300 LEDs
  arm64: dts: broadcom: bcm4908: add LEDs controller block
  arm64: dts: broadcom: bcm4908: add remaining LED pins

Link: https://lore.kernel.org/r/20220915023044.2350782-3-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-09-15 22:03:43 +02:00
William Zhang
ded8f22945 arm64: dts: Move BCM4908 dts to bcmbca folder
As part of ARCH_BCM4908 to ARCH_BCMBCA migration, move the BCM4908 dts
files to bcmbca folder and use CONFIG_ARCH_BCMBCA to build all the
BCM4908 board dts. Delete bcm4908 folder and its makefile as well.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Link: https://lore.kernel.org/r/20220803175455.47638-5-william.zhang@broadcom.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-08-15 09:51:37 -07:00