Commit Graph

3698 Commits

Author SHA1 Message Date
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
Linus Torvalds
ed302ad52b More thermal control updates for 6.9-rc1
- Fix memory leak in the error path at probe time in the Mediatek LVTS
    driver (Christophe Jaillet).
 
  - Fix control buffer enablement regression on Meditek MT7896 (Frank
    Wunderlich).
 
  - Drop spaces before TABs in different places: thermal-of, ST drivers
    and Makefile (Geert Uytterhoeven).
 
  - Adjust DT binding for NXP as fsl,tmu-range min/maxItems can vary
    among several SoC versions (Fabio Estevam).
 
  - Add support for the H616 THS controller on Sun8i platforms (Martin
    Botka).
 
  - Don't fail probe due to zone registration failure because there is
    no trip points defined in the DT (Mark Brown).
 
  - Support variable TMU array size for new platforms (Peng Fan).
 
  - Adjust the DT binding for thermal-of and make the polling time not
    required and assume it is zero when not found in the DT (Konrad
    Dybcio).
 
  - Add r8a779h0 support in both the DT and the rcar_gen3 driver (Geert
    Uytterhoeven).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmX5iDQSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRx8AAP/3SqwpcoUrb4wLC0K8d4r+KkZef3Ju3q
 phT9PNVYb1/eK1pEdr82wa8jXZkKn20bQhQR5FhJM3hfJJf3LwnP2AFtojkF5P8i
 Tg3AS9fGRXhXOP4BOwvZ4V0NjtFyf+ICxm542n5FybZYD4/TlvmaNFDj83AzwhSZ
 UY085G17nabJ5oju9YgJ8pthFOtNHB0hKvnpvhaDG3kzzvAvYFlolhYfVh/rYeL0
 bdZYXygTjokYttEuCUfSkN2g/1sNGWSWWfMjtoze+/lqjVPPX0qEklIuJ/GwVfYU
 mtHiHWDCRhlQ/lrHNhQWydJ78Dlbf64JQ5ExDuSmH6diaMXeVRtX+ORuPiwTtEQa
 DX0En7rbcXiXKy+9Q+X/Yql7nDEb3WYUOUFNgrvvYKgsX3l+wQk/y0PQStpL2Ol5
 ypen+GCdGOgQuEduyjyVJY7DSv8YsMyo7KIdAnfp4lvnCsNgHHRbE/1z0kJYpPxG
 gZ+97sodxTLIHIytr8LNTvdSu+E0qY5E7fhbTL2wikhB4BoiIavARyvnZQ1yxuhb
 QOGNY6739nHW8nimgs+bc6y6UfdpuwKh0+ID28796fu4dOng9Spl9lHeQdUrzReR
 gVg2qyCv/oj4ij9eX+B/ZIajlETKMDVAGN4vA9rVmeGWQf3nkVmVMw0KIUi+V6HN
 6n0kqo5lQ3Pb
 =jtjA
 -----END PGP SIGNATURE-----

Merge tag 'thermal-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more thermal control updates from Rafael Wysocki:
 "These update thermal drivers for ARM platforms by adding new hardware
  support (r8a779h0, H616 THS), addressing issues (Mediatek LVTS,
  Mediatek MT7896, thermal-of) and cleaning up code.

  Specifics:

   - Fix memory leak in the error path at probe time in the Mediatek
     LVTS driver (Christophe Jaillet)

   - Fix control buffer enablement regression on Meditek MT7896 (Frank
     Wunderlich)

   - Drop spaces before TABs in different places: thermal-of, ST drivers
     and Makefile (Geert Uytterhoeven)

   - Adjust DT binding for NXP as fsl,tmu-range min/maxItems can vary
     among several SoC versions (Fabio Estevam)

   - Add support for the H616 THS controller on Sun8i platforms (Martin
     Botka)

   - Don't fail probe due to zone registration failure because there is
     no trip points defined in the DT (Mark Brown)

   - Support variable TMU array size for new platforms (Peng Fan)

   - Adjust the DT binding for thermal-of and make the polling time not
     required and assume it is zero when not found in the DT (Konrad
     Dybcio)

   - Add r8a779h0 support in both the DT and the rcar_gen3 driver (Geert
     Uytterhoeven)"

* tag 'thermal-6.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal/drivers/rcar_gen3: Add support for R-Car V4M
  dt-bindings: thermal: rcar-gen3-thermal: Add r8a779h0 support
  thermal/of: Assume polling-delay(-passive) 0 when absent
  dt-bindings: thermal-zones: Don't require polling-delay(-passive)
  thermal/drivers/qoriq: Fix getting tmu range
  thermal/drivers/sun8i: Don't fail probe due to zone registration failure
  thermal/drivers/sun8i: Add support for H616 THS controller
  thermal/drivers/sun8i: Add SRAM register access code
  thermal/drivers/sun8i: Extend H6 calibration to support 4 sensors
  thermal/drivers/sun8i: Explain unknown H6 register value
  dt-bindings: thermal: sun8i: Add H616 THS controller
  soc: sunxi: sram: export register 0 for THS on H616
  dt-bindings: thermal: qoriq-thermal: Adjust fsl,tmu-range min/maxItems
  thermal: Drop spaces before TABs
  thermal/drivers/mediatek: Fix control buffer enablement on MT7896
  thermal/drivers/mediatek/lvts_thermal: Fix a memory leak in an error handling path
2024-03-19 11:11:01 -07:00
Linus Torvalds
ab522e1478 Devicetree updates for v6.9:
DT core:
 
 - Add cleanup.h based auto release of struct device_node pointers via
   __free marking and new for_each_child_of_node_scoped() iterator to use
   it.
 
 - Always create a base skeleton DT when CONFIG_OF is enabled. This
   supports several usecases of adding DT data on non-DT booted systems.
 
 - Move around some /reserved-memory code in preparation for further
   improvements
 
 - Add a stub for_each_property_of_node() for !OF
 
 - Adjust the printk levels on some messages
 
 - Fix __be32 sparse warning
 
 - Drop RESERVEDMEM_OF_DECLARE usage from Freescale qbman driver
   (currently orphaned)
 
 - Add Saravana Kannan and drop Frank Rowand as DT maintainers
 
 DT bindings:
 
 - Convert Mediatek timer, Mediatek sysirq, fsl,imx6ul-tsc,
   fsl,imx6ul-pinctrl, Atmel AIC, Atmel HLCDC, FPGA region, and
   xlnx,sd-fec to DT schemas
 
 - Add existing, but undocumented fsl,imx-anatop binding
 
 - Add bunch of undocumented vendor prefixes used in compatible strings
 
 - Drop obsolete brcm,bcm2835-pm-wdt binding
 
 - Drop obsolete i2c.txt which as been replaced with schema in dtschema
 
 - Add DPS310 device and sort trivial-devices.yaml
 
 - Enable undocumented compatible checks on DT binding examples
 
 - More QCom maintainer fixes/updates
 
 - Updates to writing-schema.rst and DT submitting-patches.rst to cover
   some frequent review comments
 
 - Clean-up SPDX tags to use 'OR' rather than 'or'
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAmX0foEACgkQ+vtdtY28
 YcOkUg//T5Q+ZudVn/oJGre3crfPU4O/RHbG+brbwpBZEdiwTGlIjI8ceThjumCO
 MY25yRewCIZtS8MLlRb/lNPUjQxPeyYWnpO3KZHbOJhU8bJCl2M5P0CQOYJNp0fl
 fMFhFU5bKVoXyK6y3qx7ivZTXSBCz9KzB1HxY3LueMHVgWiO1Oi++XjLfcos86Mh
 7dKZKNbpcnBFkXiESMksQS+asZkoRtZloFg4iFjniSLa8AgYJLsZXd7iW4s0IXy+
 Xj+5IcIRcPv2xQoXfCvlcKMheJyePDA1coYpO8pmOYOpjCQzsCnnbzoNERW6hc9u
 0DF2IWnq9WLlQ8RVijbECRPgwW6zuU+aklUZLz2q0AiwCVySHaMdC9iYe+KK/7GH
 m0F21x5mpfK0LVfOMWLsmuqKWn9J164VAeTY9zHqcWuvCohD5ulftvQgRBEiSDtv
 V3l668t6v67iMkYa8SncbuMkV/NSShWPGne+yP3smvL0pe0P0MJYb1XSstlbNXuK
 whTDaCydEHx3JPJ6VS/1aJnELFm+uZVl8wjhfrgbWo2hIC83qjN3k0yV+vFNdFzT
 5PUfI858fvgYOrGsswYCCJXmb/s37NImCnIF/sjqvj50BA468261KYAFtapa2Vlj
 uvpKgIZHJEDOK6TPlk5n7+aaOwoLMYzm+yov/0gyRpRKqsXu52U=
 =YzNN
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree updates from Rob Herring:
 "DT core:

   - Add cleanup.h based auto release of struct device_node pointers via
     __free marking and new for_each_child_of_node_scoped() iterator to
     use it.

   - Always create a base skeleton DT when CONFIG_OF is enabled. This
     supports several usecases of adding DT data on non-DT booted
     systems.

   - Move around some /reserved-memory code in preparation for further
     improvements

   - Add a stub for_each_property_of_node() for !OF

   - Adjust the printk levels on some messages

   - Fix __be32 sparse warning

   - Drop RESERVEDMEM_OF_DECLARE usage from Freescale qbman driver
     (currently orphaned)

   - Add Saravana Kannan and drop Frank Rowand as DT maintainers

  DT bindings:

   - Convert Mediatek timer, Mediatek sysirq, fsl,imx6ul-tsc,
     fsl,imx6ul-pinctrl, Atmel AIC, Atmel HLCDC, FPGA region, and
     xlnx,sd-fec to DT schemas

   - Add existing, but undocumented fsl,imx-anatop binding

   - Add bunch of undocumented vendor prefixes used in compatible
     strings

   - Drop obsolete brcm,bcm2835-pm-wdt binding

   - Drop obsolete i2c.txt which as been replaced with schema in
     dtschema

   - Add DPS310 device and sort trivial-devices.yaml

   - Enable undocumented compatible checks on DT binding examples

   - More QCom maintainer fixes/updates

   - Updates to writing-schema.rst and DT submitting-patches.rst to
     cover some frequent review comments

   - Clean-up SPDX tags to use 'OR' rather than 'or'"

* tag 'devicetree-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (56 commits)
  dt-bindings: soc: imx: fsl,imx-anatop: add imx6q regulators
  of: unittest: Use for_each_child_of_node_scoped()
  of: Introduce for_each_*_child_of_node_scoped() to automate of_node_put() handling
  of: Add cleanup.h based auto release via __free(device_node) markings
  of: Move all FDT reserved-memory handling into of_reserved_mem.c
  of: Add KUnit test to confirm DTB is loaded
  of: unittest: treat missing of_root as error instead of fixing up
  x86/of: Unconditionally call unflatten_and_copy_device_tree()
  um: Unconditionally call unflatten_device_tree()
  of: Create of_root if no dtb provided by firmware
  of: Always unflatten in unflatten_and_copy_device_tree()
  dt-bindings: timer: mediatek: Convert to json-schema
  dt-bindings: interrupt-controller: fsl,intmux: Include power-domains support
  soc: fsl: qbman: Remove RESERVEDMEM_OF_DECLARE usage
  dt-bindings: fsl-imx-sdma: fix HDMI audio index
  dt-bindings: soc: imx: fsl,imx-iomuxc-gpr: add imx6
  dt-bindings: soc: imx: fsl,imx-anatop: add binding
  dt-bindings: input: touchscreen: fsl,imx6ul-tsc convert to YAML
  dt-bindings: pinctrl: fsl,imx6ul-pinctrl: convert to YAML
  of: make for_each_property_of_node() available to to !OF
  ...
2024-03-15 12:37:59 -07:00
Rafael J. Wysocki
4e7193acde - Fix memory leak in the error path at probe time in the Mediatek LVTS
driver (Christophe Jaillet)
 
 - Fix control buffer enablement regression on Meditek MT7896 (Frank
   Wunderlich)
 
 - Drop spaces before TABs in different places: thermal-of, ST drivers
   and Makefile (Geert Uytterhoeven)
 
 - Adjust DT binding for NXP as fsl,tmu-range min/maxItems can vary
   among several SoC versions (Fabio Estevam)
 
 - Add support for H616 THS controller for the Sun8i platforms. Note
   that this change relies on another change in the SoC specific code
   which is included in this branch (Martin Botka)
 
 - Don't fail probe due to zone registration failure because there is
   no trip points defined in the DT (Mark Brown)
 
 - Support variable TMU array size for new platforms (Peng Fan)
 
 - Adjust the DT binding for thermal-of and make the polling time not
   required and assume it is zero when not found in the DT (Konrad
   Dybcio)
 
 - Add r8a779h0 support in both the DT and the driver (Geert Uytterhoeven)
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEGn3N4YVz0WNVyHskqDIjiipP6E8FAmXxqsUACgkQqDIjiipP
 6E9jDgf+NpBl2l9Wb8EhFcB+QRcOY79rn8KzifM4XdU1qwoog3I64lt5mAcznpbf
 7hLK9DQJYjuIx8oi/uxKaYSCno1bwuY/Vpi0/BBQ2DxhhX26C7XfZ+D4o1M3/ciZ
 /jsoaXg3WMKYVeywaHohWxjWH+rLGXxmxDlfcAXlKdAZkbEKLCzsbaRaSy/H8Xhc
 zk9Cr2RdV+HHcuAWK1TGEHUGXINSR5tk5TvY7QCfvLYsloGpSLi6vr68CAEpvBQB
 6pxW8BkAWAVQy6pgP3WthzpE+ZkEnv1vhu7fn0uoEjuxedqvdj+PKDC4svm1k/pA
 +8sV89A5RZi1zOoWWYj8TnH/K2W85w==
 =rTh4
 -----END PGP SIGNATURE-----

Merge tag 'thermal-v6.9-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux

Merge additional thermal control changes for 6.9-rc1 from Daniel Lezcano:

"- Fix memory leak in the error path at probe time in the Mediatek LVTS
   driver (Christophe Jaillet)

 - Fix control buffer enablement regression on Meditek MT7896 (Frank
   Wunderlich)

 - Drop spaces before TABs in different places: thermal-of, ST drivers
   and Makefile (Geert Uytterhoeven)

 - Adjust DT binding for NXP as fsl,tmu-range min/maxItems can vary
   among several SoC versions (Fabio Estevam)

 - Add support for H616 THS controller for the Sun8i platforms. Note
   that this change relies on another change in the SoC specific code
   which is included in this branch (Martin Botka)

 - Don't fail probe due to zone registration failure because there is
   no trip points defined in the DT (Mark Brown)

 - Support variable TMU array size for new platforms (Peng Fan)

 - Adjust the DT binding for thermal-of and make the polling time not
   required and assume it is zero when not found in the DT (Konrad
   Dybcio)

 - Add r8a779h0 support in both the DT and the driver (Geert Uytterhoeven)"

* tag 'thermal-v6.9-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
  thermal/drivers/rcar_gen3: Add support for R-Car V4M
  dt-bindings: thermal: rcar-gen3-thermal: Add r8a779h0 support
  thermal/of: Assume polling-delay(-passive) 0 when absent
  dt-bindings: thermal-zones: Don't require polling-delay(-passive)
  thermal/drivers/qoriq: Fix getting tmu range
  thermal/drivers/sun8i: Don't fail probe due to zone registration failure
  thermal/drivers/sun8i: Add support for H616 THS controller
  thermal/drivers/sun8i: Add SRAM register access code
  thermal/drivers/sun8i: Extend H6 calibration to support 4 sensors
  thermal/drivers/sun8i: Explain unknown H6 register value
  dt-bindings: thermal: sun8i: Add H616 THS controller
  soc: sunxi: sram: export register 0 for THS on H616
  dt-bindings: thermal: qoriq-thermal: Adjust fsl,tmu-range min/maxItems
  thermal: Drop spaces before TABs
  thermal/drivers/mediatek: Fix control buffer enablement on MT7896
  thermal/drivers/mediatek/lvts_thermal: Fix a memory leak in an error handling path
2024-03-13 20:35:48 +01:00
Arnd Bergmann
72ebb41b88 soc: fsl: dpio: fix kcalloc() argument order
A previous bugfix added a call to kcalloc(), which starting in gcc-14
causes a harmless warning about the argument order:

drivers/soc/fsl/dpio/dpio-service.c: In function 'dpaa2_io_service_enqueue_multiple_desc_fq':
drivers/soc/fsl/dpio/dpio-service.c:526:29: error: 'kcalloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  526 |         ed = kcalloc(sizeof(struct qbman_eq_desc), 32, GFP_KERNEL);
      |                             ^~~~~~
drivers/soc/fsl/dpio/dpio-service.c:526:29: note: earlier argument should specify number of elements, later size of each element

Since the two are only multiplied, the order does not change the
behavior, so just fix it now to shut up the compiler warning.

Dmity independently came up with the same fix.

Fixes: 5c4a5999b2 ("soc: fsl: dpio: avoid stack usage warning")
Reported-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-13 17:17:32 +01:00
Linus Torvalds
2184dbcde4 ARM: SoC drivers for 6.9
This is the usual mix of updates for drivers that are used on (mostly
 ARM) SoCs with no other top-level subsystem tree, including:
 
  - The SCMI firmware subsystem gains support for version 3.2 of the
    specification and updates to the notification code.
 
  - Feature updates for Tegra and Qualcomm platforms for added
    hardware support.
 
  - A number of platforms get soc_device additions for identifying newly
    added chips from Renesas, Qualcomm, Mediatek and Google.
 
  - Trivial improvements for firmware and memory drivers amongst
    others, in particular 'const' annotations throughout multiple
    subsystems.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXvgbsACgkQYKtH/8kJ
 UieH8Q/+LRzESrScIwFq0/V7lE1AadmhwMwcEf1Fsq8aMrelvPm/SWvHgIWIHTvV
 IZ/g3XS/CnBxr1JG3nbyMMe/2otEY7JxsUOOqixIuZ2gdzJvzZOBHMi54xDwbFRx
 4NbP0CRTy8K35XNnOkJO3TnwBFP+q2Fu6qHY90as8M2GIxQpWb8OONJHh8N2qPq+
 Hi3H0jjKXMInnOKpNIEQI60N4F2djGMHWkDySwFtHu40RaJjCIfmVd3PWQGz7RHl
 WQHjZ6CB+/BDgqfG0ccQ7Cikc4BLorZsjKCn8bsaLtdp4HvRCTp2ZpuFFTRq6vay
 IxqJCXrgpKjM1k9plehObEhMv4lNMbD1djG8Y6hqC+PPKbDfOLvlcat3xUK2AGgb
 ROJtKDQMXfAeSnLpw9n4Ox+BZRmwMIOcTU/20N72hlcZKY1jq/KuSqQn+LPVKIrW
 pJIhWd1B8R+2O1TewuIe3fjvfQwgATMBHBUVNRkSrzqkpcZNGQ3M5koMpClVvY6T
 Z/+hdAg58EQw0K6ukJLyrevxs1pHHhYXLCECIoU/xPs4NX4hDk7rKTFv6fdLS4Y2
 24qzjhIGYdhRXmhRQdVq+06cr3cvtm1z7Fqna3tW1+J6wtBnHO/xZ63M9n5saPcm
 NgKMAN7YLLMYuUNrd39W7U2wLGQCgknjhrbH8ZmxPypk467v08k=
 =bV/K
 -----END PGP SIGNATURE-----

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

Pull ARM SoC driver updates from Arnd Bergmann:
 "This is the usual mix of updates for drivers that are used on (mostly
  ARM) SoCs with no other top-level subsystem tree, including:

   - The SCMI firmware subsystem gains support for version 3.2 of the
     specification and updates to the notification code

   - Feature updates for Tegra and Qualcomm platforms for added hardware
     support

   - A number of platforms get soc_device additions for identifying
     newly added chips from Renesas, Qualcomm, Mediatek and Google

   - Trivial improvements for firmware and memory drivers amongst
     others, in particular 'const' annotations throughout multiple
     subsystems"

* tag 'soc-drivers-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (96 commits)
  tee: make tee_bus_type const
  soc: qcom: aoss: add missing kerneldoc for qmp members
  soc: qcom: geni-se: drop unused kerneldoc struct geni_wrapper param
  soc: qcom: spm: fix building with CONFIG_REGULATOR=n
  bus: ti-sysc: constify the struct device_type usage
  memory: stm32-fmc2-ebi: keep power domain on
  memory: stm32-fmc2-ebi: add MP25 RIF support
  memory: stm32-fmc2-ebi: add MP25 support
  memory: stm32-fmc2-ebi: check regmap_read return value
  dt-bindings: memory-controller: st,stm32: add MP25 support
  dt-bindings: bus: imx-weim: convert to YAML
  watchdog: s3c2410_wdt: use exynos_get_pmu_regmap_by_phandle() for PMU regs
  soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs
  MAINTAINERS: Update SCMI entry with HWMON driver
  MAINTAINERS: samsung: gs101: match patches touching Google Tensor SoC
  memory: tegra: Fix indentation
  memory: tegra: Add BPMP and ICC info for DLA clients
  memory: tegra: Correct DLA client names
  dt-bindings: memory: renesas,rpc-if: Document R-Car V4M support
  firmware: arm_scmi: Update the supported clock protocol version
  ...
2024-03-12 10:35:24 -07:00
Andre Przywara
f8cfe02a53 soc: sunxi: sram: export register 0 for THS on H616
The Allwinner H616 SoC contains a mysterious bit at register offset 0x0
in the SRAM control block. If bit 16 is set (the reset value), the
temperature readings of the THS are way off, leading to reports about
200C, at normal ambient temperatures. Clearing this bits brings the
reported values down to the expected values.
The BSP code clears this bit in firmware (U-Boot), and has an explicit
comment about this, but offers no real explanation.

Experiments in U-Boot show that register 0x0 has no effect on the SRAM C
visibility: all tested bit settings still allow full read and write
access by the CPU to the whole of SRAM C. Only bit 24 of the register at
offset 0x4 makes all of SRAM C inaccessible by the CPU. So modelling
the THS switch functionality as an SRAM region would not reflect reality.

Since we should not rely on firmware settings, allow other code (the THS
driver) to access this register, by exporting it through the already
existing regmap. This mimics what we already do for the LDO control and
the EMAC register.

To avoid concurrent accesses to the same register at the same time, by
the SRAM switch code and the regmap code, use the same lock to protect
the access. The regmap subsystem allows to use an existing lock, so we
just need to hook in there.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240219153639.179814-2-andre.przywara@arm.com
2024-03-11 17:14:46 +01:00
Rob Herring
3e62273ac6 soc: fsl: qbman: Remove RESERVEDMEM_OF_DECLARE usage
There is no reason to use RESERVEDMEM_OF_DECLARE() as the initialization
hook just saves off the base address and size. Use of
RESERVEDMEM_OF_DECLARE() is reserved for non-driver code and
initialization which must be done early. For qbman, retrieving the
address and size can be done in probe just as easily.

Link: https://lore.kernel.org/r/20240201192931.1324130-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
2024-03-06 18:30:59 -06:00
Arnd Bergmann
049238d244 A few Qualcomm driver fixes for v6.9
This fixes a "defined but not used"-warning in SPM driver when kernel is
 built without regulator support, and corrects a couple of kernel-doc
 issues in aoss and geni-se drivers.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmXn4QEVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FU0oQAK85IzmIeso/NfydQUfdmE6EE+xM
 vlCCteYJG68Y38uxiQnyx7jCyj8czIt4oZ+t3GoduIiUFJ/6ACV2yNJMMRSWixIc
 fXMM0HU+zgfeRyCXx9diuobbahVNFPjkjKF7y9vog7fL5uQSirXD/MwFu7/o3SZf
 2UtDp2JTKexbo1/DNlIbB8OM0tzCFS55rodE7Rw6tZGaa8mt5D9lTS6wtnsyftM4
 IyRBk53R8yeDO1fnitW6si/RSDBeT7yauy1MfOR7Ofo5xkBhHHcyCGIfa3+6pUtz
 waDnXTd1nTcFvJTwoAgVw1XWVm60YAm76NZYyUOzntsBS5D03MQX+ao3AKvdjxIa
 OUdts6EWqJtdoY7Y/UJbPpO5cZ/10r1z+Mka+9tG6UjTUv2xnxUc6ND/7pFGwmLo
 2m7VS8eAcNw2OogrOjNtdR1jS/Fd57lXq8KPbSEgm+r8yw7GE2jJEsM1mbLTo+O+
 CABdHKnDmDWePuLOT1qP0cR72QwVI5ERaZjMdwbdgqMsWp/KmmETLtb5N5PoTXnQ
 vj70YBE2WYL/YNzc03BJe4rH1EvSSGzb5BKwEAYnnfx6HSsJHqyfQBJV6cGCFl3u
 sloRMClPG19CS+eQtHhLCC4SfiH5o7iRYmCZCeyKqmqlvevaBvbflmELgb8xpxry
 YiwXKkTOc5UcW1Ez
 =3ZwG
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXoEKIACgkQYKtH/8kJ
 Uifl6Q//YmyyNOucScttDSu/Nf2NlYo/FT7Rl8mrZgK1Aa6k35l+OfYn2qnJG6o6
 O4tsx6JTAWKqbJNa1pCfqeLR98LZRaKx05ZXmR7cAOa33BtZZt5q+oG7KayO9/Qu
 e7Pp26qOE4k89am+a10A3V3Qiy/QNjXGMx4Ihv1y+forbpWi6n/eiUn9i2IWcIkd
 HmCkkxkLmI7P/q1cN8g9m1FMnC+C6kw8M3jz3Ok7JEgwkJu91sRMOuQbLaHgwJiC
 OdEOdtNFLMzoBEJObTZkR1crgNd3uJ9zMrKoTsRu6QzSgovJ2LO0z8yqOfM613iY
 hj706gcWBSnK4eBnmMFFWYDQGzVmqqfJnCvuBzGi312uC2IDom762sx0Ha5I49PV
 p69IESO6R3aE7wp5AC9cwYlOxWF8PKhnd+FtOr+fM/xfyETJLcPJxvZk5VllIgUN
 MHXY3k9bsKNXOa0h2B8gxe+Sm5/YTKQd7ToIIM6pBVOqWXckzdq5L/wiFk4f3/hk
 2RoAwqGAdbzTMVKGoN5LMNcsOmZxSEXL7a1KO1EcXM9wq8o1tfXQUFdrqb6VpT3I
 tVxN0P7mJ3aQalo9K0fJB+R8ImgDAhuZ2HFEALpZ0ve/H00cOL+8bt3kS7g2GhGb
 mbkAUfiq3kfwUH1MCx9yfKdGyMBT/jD1jfTC9rsiblDWVbrl5wg=
 =+egw
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.9-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

A few Qualcomm driver fixes for v6.9

This fixes a "defined but not used"-warning in SPM driver when kernel is
built without regulator support, and corrects a couple of kernel-doc
issues in aoss and geni-se drivers.

* tag 'qcom-drivers-for-6.9-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: aoss: add missing kerneldoc for qmp members
  soc: qcom: geni-se: drop unused kerneldoc struct geni_wrapper param
  soc: qcom: spm: fix building with CONFIG_REGULATOR=n

Link: https://lore.kernel.org/r/20240306032120.5036-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-06 07:43:46 +01:00
Arnd Bergmann
63caaee9af Samsung SoC driver changes for v6.9, part two
1. Extend Exynos PMU (Power Management Unit) driver being also the
    syscon to main system controller registers block, to support Google
    GS101.  The Google GS101 has PMU registers protected and writing is
    available only via SMC.  The Exynos PMU will register its own custom
    regmap for such case of mixed MMIO+SMC.
 
 2. Rework Samsung watchdog driver to get the regmap to PMU block not
    via syscon API, but from the Exynos PMU driver.  This is necessary
    for the watchdog driver to work on Google GS101.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmXdl6oQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1wZ2D/9NYhjQFu7PfnRUBIcrTIyTBSf11b61EIKR
 KwxDR/MhJ/+C7Zo4YKiWbJGQEhm1sG8LUsOWV4RBy5QhqeyqFCqDC8Pba6YH15MO
 9SfBT2eGgw9NVNxULGPMmuI9/It9umDKc9q9UyBxBGxXo2C8S8vtX4HLfIIVZ2fv
 /uSxW073K7qbWb0c5WUvxMYgdHHwkPyZAecK3yLRNIsFnEZuo7uytmCcVcIBKSoz
 LAv18fa65oZt2NOvvKrzLWNDaYcobzRfEW9r6XPkGkuh5SUJ/076T3W3IGbfNJAq
 DaB7XAFw3EsvORs7gMQAoyGA/+4RQVTMLcKM//2Et3A3ug+gKJ9i0/Y08Ay4FbAU
 cpryMGmb81XWb82yvP9p5XjynGFHGFd5we7ZFbcJeXn/uc4W0l4Zca33h7ulWBRY
 iUD+n0r/cWpVuA1pxK0cldfxOn0yZuq1Y1pOcZY/neDQdb2C7tTgZ2xBgNwWZdhz
 G3BTHo+oU72oMoAR7AJKJymVUzHQftEkWwTiD4NQenNQ11rBeNcEgtcZevxUuGff
 mnLrxaf+Bf+ykZOFGQJwHFIG0nRbIyRtZ+uv/Tqe/FEam6O7P159PJjDgf7Yvy9/
 SY7J28u3x6zjeFZ4PbiqGcoYecl5mSQwZSLY/IaiT2bao6Z54C8JYiMOS4Iw5VG2
 aLCpaAzlDw==
 =FkS9
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXl7rQACgkQYKtH/8kJ
 Uif1IA/9FXTi9VfB32rMoC6FOMl5AgYO1rW7d3VvLIhv503xkWTc8anW/LhljajC
 CMZ4xTC8XUvS2RkgKFleqi51sAXuuov+uTX4zfm1HPKXk0ZUFlcdllJvlD1PDL84
 IcLTSNKl3Eo+aNt8ccBaoAQ8X2bOAu4a9Zj0uV89OUtuVCKarKwZ4iLGBs/BRJMU
 ajQBgAX6CN8dgivyrm7y4RSdT0pSWudzpeqAdhaXrTXOa51aooUXLsM+hMuN/QFb
 zDbmYlnQFHZZBNhFDC4/+XWPopgvW+dNCri7kRnmuJWWgBFkNh/X4sv3FxA2J9oA
 mo3/EtLDy/WZuZaFGv5OCj0DO9UJVdGfs3ybGYbgKpnqwb2eRkdWdMnsxK53HOLK
 rSGet+6NiPQbjpApJaBzOePRHfUf/nMueYvep3SfDB0unSaquhTrR1SM3G5y5JFW
 oXzXyqi0GuerZdOEK9OVXJ+D85yz8BSKmfo0zyTSFbwmDrHdbHXknlXSwflZJHtC
 1qX3vuiuFo1bqCfGjQRb/tcojU6cU0HAJnswSOvOH8paYCb2mK1sX23dv1QgEEQl
 xdJBaERrmuN3ppZXsxkmKsttzKU9go3Q2TiWJgnUXXFe1Vz2csbn1jFczzLFxEXH
 kYQKvx0EfV2KxjPDNBWymJHoI0XqNSsyYtAPenDhKp4/biVIW0E=
 =mJ3H
 -----END PGP SIGNATURE-----

Merge tag 'samsung-drivers-6.9-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers

Samsung SoC driver changes for v6.9, part two

1. Extend Exynos PMU (Power Management Unit) driver being also the
   syscon to main system controller registers block, to support Google
   GS101.  The Google GS101 has PMU registers protected and writing is
   available only via SMC.  The Exynos PMU will register its own custom
   regmap for such case of mixed MMIO+SMC.

2. Rework Samsung watchdog driver to get the regmap to PMU block not
   via syscon API, but from the Exynos PMU driver.  This is necessary
   for the watchdog driver to work on Google GS101.

* tag 'samsung-drivers-6.9-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  watchdog: s3c2410_wdt: use exynos_get_pmu_regmap_by_phandle() for PMU regs
  soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs
  MAINTAINERS: samsung: gs101: match patches touching Google Tensor SoC

Link: https://lore.kernel.org/r/20240227080755.34170-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-04 16:54:27 +01:00
Arnd Bergmann
daa0987e1f Qualcomm driver updates for v6.9
This introduces the Qualcomm Programmable Boot Sequencer (PBS) driver.
 
 The Qualcomm SMEM no longer acquires the hwspinlock during the "get"
 operation, to improve the system behavior during the recovery of a
 remoteproc that crashed with the hwspinlock held.
 
 The Qualcomm Always On Subsystem (AOSS) message protocol driver gains
 tracepoints, printf annotation, and a debugfs interface is introduced
 for tweaking system properties during development and debugging.
 
 The Qualcomm socinfo driver gains data for SM8475, QCM8550 and
 QCS8550 platforms, and the PM2250 is renamed to PM4125.
 
 Support for controlling the voltage regulator in SPM/SAW2 is introduced.
 
 The gfx.lvl power-domain is dropped for SA8540P, as this resource was
 incorrectly inherited from SC8280XP.
 
 Additionally some code cleanup improvements is introduced across APR,
 LLCC, SMP2P and SPM.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmXarn0VHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FzZoP/2hYUMS+sR2kD7gZDGi8oV71C+dQ
 Vmo1MQIhGjYEb6HSHdrxp/11GPlLVU45xuk9/FFVqAPrxNQm2y9NC60Ye1TQNWZR
 XS+w5+YkIFdfZIbZ8GGmlPspeXDSnq2DGWQjht+cBNyASzhjO5ICP79WQ0jfHgjH
 l5pNw3YMamc7pwdX2oslxXV8HzDr4JxzpveV0+QbsVDU4J04mrxoBRmv2cdqv2Eb
 5jNR4HjmCQkdI/bp/2frCmWmGP9bqP24C6XWCe4lXuCAsmNKAeEeuyABnsPNRYrO
 5ELd2sPpXBLBUhR9w/0rY9ouIsJ500BD7U1yLrHocwGICL1Ro7dGjnyp6j/7Tm9X
 1nx2mHK7ywH7E6BxVTcmDS3CtymcMknpUfUjANJ/yQrAmcqvKRA3F0ELiXywrndQ
 0R97qjc9ixVaM5LU4kMgQG50NZCmsNPJ7a3smOihpmfJK+6Mmkc5XxFRYuJgL9Ag
 b1PwnVgzeBPQAs+Tx7i5bBfFOa49zVxHYIFfu+XY50DL80viiKCRAeXQNyWmJ0qM
 3tKgMeIY2nXZJ0DvySFfro51AnZcXEMa3Bc5qNZlM4jaqXGPkDocAV9CYKntlXFU
 POnOnGo4liZalWqel3tTuDoBu3nVAq0q4+ooWl755TRGBtIvW1tWAOgldjg6v3Ef
 6BgAWh8GrEHM0etB
 =T09a
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXl7kUACgkQYKtH/8kJ
 UidEfQ//eugpCwNrv6q1TdlSBJkwlVV/3VJLewh4SCdpckQNJ9ysxDt0hnbTVVz8
 ykR0ilYLrpuinbWSaBIZp4oxypIHOEhXzQf1diyrAjM9T5mVnv+Ytdy3qDrQ1SOM
 yg8n64aaBCrJiCJk3vHitS2DxStbmikX8i0dzQNeG7YskplrkbKXqtXjQ8zmanAc
 2Y4Ot1DMoTKjp4t6mC7yF5YXTEfCkg0eHaIdzMREarWRUU+g0qqR43T416AhayM5
 4mNH42/0rxJtvN3+EeQkVBXMWu2hmHt9esdR216GZ22fS+J9HAVOGPM+oga1Td7c
 947T2BB55AalfjiNxWbfabxNmHyEuVyYWaDAJO/qU0ZIE+539QAVaW9xrTxYeOFp
 PbctLehm3DUPmR453R4oUTGC6UD+OnZOj+ppy/vB08UbdF5bV0KRT/hviOR+bb6U
 VCYRbDIsfzY1fFFLJShZONogZADtciDjel7WATwhttw503NLH5DaebD+OjPbHVgq
 U4y7maUGPkbAPJT4YbYOcetqVOnYiFp8OG3J/JDTOr3+3RNtInPYao5TSb1QNjGh
 A7+4jKf0X8err26xpmGXfa2nG8hUNOPn/PYVNwxgWmq0P74KR2GwenB4ze+SME2J
 sc6ZQy4LAnU8KSAZpLVPrv78R9cbyCvCtWbQpKzY8l8PfzhaK24=
 =bPSM
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.9

This introduces the Qualcomm Programmable Boot Sequencer (PBS) driver.

The Qualcomm SMEM no longer acquires the hwspinlock during the "get"
operation, to improve the system behavior during the recovery of a
remoteproc that crashed with the hwspinlock held.

The Qualcomm Always On Subsystem (AOSS) message protocol driver gains
tracepoints, printf annotation, and a debugfs interface is introduced
for tweaking system properties during development and debugging.

The Qualcomm socinfo driver gains data for SM8475, QCM8550 and
QCS8550 platforms, and the PM2250 is renamed to PM4125.

Support for controlling the voltage regulator in SPM/SAW2 is introduced.

The gfx.lvl power-domain is dropped for SA8540P, as this resource was
incorrectly inherited from SC8280XP.

Additionally some code cleanup improvements is introduced across APR,
LLCC, SMP2P and SPM.

* tag 'qcom-drivers-for-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (23 commits)
  dt-bindings: soc: qcom: qcom,saw2: add msm8226 l2 compatible
  soc: qcom: spm: add support for voltage regulator
  soc: qcom: spm: remove driver-internal structures from the driver API
  dt-bindings: soc: qcom: qcom,saw2: define optional regulator node
  dt-bindings: soc: qcom: qcom,saw2: add missing compatible strings
  dt-bindings: soc: qcom: merge qcom,saw2.txt into qcom,spm.yaml
  soc: qcom: llcc: Check return value on Broadcast_OR reg read
  soc: qcom: socinfo: Add Soc IDs for SM8475 family
  dt-bindings: arm: qcom,ids: Add IDs for SM8475 family
  soc: qcom: apr: make aprbus const
  dt-bindings: soc: qcom: qcom,pmic-glink: document X1E80100 compatible
  soc: qcom: add QCOM PBS driver
  dt-bindings: soc: qcom: Add qcom,pbs bindings
  pmdomain: qcom: rpmhpd: Drop SA8540P gfx.lvl
  soc: qcom: socinfo: rename PM2250 to PM4125
  soc: qcom: aoss: Add tracepoints in qmp_send()
  soc: qcom: socinfo: add SoC Info support for QCM8550 and QCS8550 platform
  dt-bindings: arm: qcom,ids: add SoC ID for QCM8550 and QCS8550
  soc: qcom: aoss: Add debugfs interface for sending messages
  soc: qcom: smem: remove hwspinlock from item get routine
  ...

Link: https://lore.kernel.org/r/20240225030612.480241-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-04 16:52:37 +01:00
Arnd Bergmann
3326155e5b soc/tegra: Changes for v6.9-rc1
This set of changes adds ACPI support for the APBMISC driver and cleans
 up a few things like dependencies and unused code.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmXY1VEACgkQ3SOs138+
 s6HqkA//ZtHaCTLiQQI97Go9dd0OnFIhQi1fnp1jwzexTWe5mT6RDJaSH/k+H/8c
 wZiSGuZrgedKKAHX4luYJNPrZNIU3u5pEAe/H78N+c29mcS2Ynv0M++Kc3vKn1DW
 yfRv6vXge6UaFZsS8zvrsb9F8q5yAouhAW3BosOwYwv41Z6KoqOBzIAnGzSSgfLl
 fBErk8IutUscTeQHj9UNxeRZeYmr1M5nin4LwrQ9cZWASN0OBFXL+PpGatlY701z
 5uCIJb4obz0z4NV27JxdrX12Z3ej+dd0NE3swwKGGi02ROCMlcQO8Zc9/+seSZGe
 M9q6CWzelvJYVEFISGidx0N0l/eexJQac7koDNHJVvqVlVYYpBtY5RG5dsVofXTk
 gNc+T0bI/D4h5kHbCFNPhwrwEp2rvkWufh7zgBLlBamjoc/VAkpxSXgJal7Wc6HS
 YG0WziUARNsFHdff5s1g3ayh3ssnAT3m/1SNjMo5cqrv421tiy2gwsuL/LbxeBDY
 RQ3dUfsVGmsCJUvbiJIetJUBX5VnVDkwIVBSd97i7yez4e3dBKhb1sAP1wWYcFKw
 CcfWHPW9XNypDo66vmXtEGXtsero10/d9BhmUjrAQ8iY9/kgCpsyEnL5oYMP8sEM
 UwZ6tPoAyPZQcqQpTwjPHwjYtXcXamUKrjx8zIeR7bLa6JYfd+Q=
 =8s0Z
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXl7UkACgkQYKtH/8kJ
 UifTQxAAqGsI+jW/1MFAokcJ3qOSZddlVl/5E6W1Ds6+okP6HnMN9lrVAuHkbiqc
 j2fGRp3b6J0uqNjCKGa1FM+5jnY7C/ym73b43BGm4I5bEhuhE0CseOs3iCtNZa4Y
 r2MQa9Ink0H2JDP4MrACTt7ig0mvmQy8favE9ETMc75AxuQSWyxCG/ApgsXTI7Lx
 mcGO8s5aggpBksuAZPzSGf2tbxmF1lQemjg69ciRGtGFR7EQ2bIdyrZoH+AzQnje
 tgxzk8sPJhqq0wbqbtrrIHbKLzmSH5R+0wXEUdRSvdinbL5VHKWkWOpeGS2ca0k1
 umZ/hAQWWVNmZylsEBpF4W3yX13SivpTfUPkmVdNKQfEnTez2GiDYZyOEWVuvbFj
 WhNxu2YTY44X4N8bY4lpJ7x9YCAUJm2Z8cuZ0m0lD22fM64rJQaG7dsGhAy9MK5M
 jO6S0xmNfehC8v5gn2RBNCikVpp25W1IzhTpfWPjLJi4pYSeM+wRwWsgGbX6QrfI
 me6WrRGVwgCFTbmyUgH/d3wgSLHf5J7hP2+NZ4VBjRhGc3ltwzo99crypQFpUlhY
 D39wYI3jb+16cLLfryRP4LEik1WND+0h5JrYMMG2x3lswzRVv66A+v/00LAiOSQj
 2DFxP0NS8Ig/AgkPR5g5KLBtCn7GvjrYm9+qFmCToZOcRbIqINA=
 =j1US
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.9-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers

soc/tegra: Changes for v6.9-rc1

This set of changes adds ACPI support for the APBMISC driver and cleans
up a few things like dependencies and unused code.

* tag 'tegra-for-6.9-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Add SD wake event for Tegra234
  soc/tegra: pmc: Update scratch as an optional aperture
  soc/tegra: pmc: Update address mapping sequence for PMC apertures
  bus: tegra-aconnect: Update dependency to ARCH_TEGRA
  soc/tegra: Fix build failure on Tegra241
  soc/tegra: fuse: Fix crash in tegra_fuse_readl()
  soc/tegra: fuse: Define tegra194_soc_attr_group for Tegra241
  soc/tegra: fuse: Add support for Tegra241
  soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234
  soc/tegra: fuse: Add function to print SKU info
  soc/tegra: fuse: Add function to add lookups
  soc/tegra: fuse: Add tegra_acpi_init_apbmisc()
  soc/tegra: fuse: Refactor resource mapping
  soc/tegra: fuse: Use dev_err_probe for probe failures
  mm/util: Introduce kmemdup_array()
  soc/tegra: pmc: Remove some old and deprecated functions and constants

Link: https://lore.kernel.org/r/20240223174849.1509465-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-04 16:48:25 +01:00
Krzysztof Kozlowski
9f378a6216 soc: qcom: aoss: add missing kerneldoc for qmp members
Add missing kerneldoc to silence:

  qcom_aoss.c:93: warning: Function parameter or struct member 'debugfs_root' not described in 'qmp'
  qcom_aoss.c:93: warning: Function parameter or struct member 'debugfs_files' not described in 'qmp'

Fixes: d51d984c55 ("soc: qcom: aoss: Add debugfs interface for sending messages")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240225202545.59113-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-03-03 20:01:51 -08:00
Krzysztof Kozlowski
87edd944ff soc: qcom: geni-se: drop unused kerneldoc struct geni_wrapper param
Drop description of non-existing 'struct geni_wrapper' member:

  qcom-geni-se.c:99: warning: Excess struct member 'to_core' description in 'geni_wrapper'

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240225202545.59113-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-03-03 20:01:51 -08:00
Arnd Bergmann
26a526c256 soc: qcom: spm: fix building with CONFIG_REGULATOR=n
The newly added code causes a build failure when -Werror is set:

drivers/soc/qcom/spm.c:388:12: error: 'spm_get_cpu' defined but not used [-Werror=unused-function]

Remove the #ifdef and instead use an IS_ENABLED() check that lets the
compiler perform dead code elimination instead of the preprocessor.

Fixes: 6496dba142 ("soc: qcom: spm: add support for voltage regulator")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240221154457.2007420-1-arnd@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-03-03 19:54:47 -08:00
Dave Airlie
45046af3d0 A reset fix for host1x, a resource leak fix and a probe fix for aux-hpd,
a use-after-free fix and a boot fix for a pmic_glink qcom driver in
 drivers/soc, a fix for the simpledrm/tegra transition, a kunit fix for
 the TTM tests, a font handling fix for fbcon, two allocation fixes and a
 kunit test to cover them for drm/buddy
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZeCIDAAKCRDj7w1vZxhR
 xSYQAP9KTXlKqw9p/jFw/MFqBxzvwmi4/M5iUReoajPo1uCeCAD/ZY71qqBKCnrx
 LiLHbQgvzWowxyq2A6fS28Ml7Vb5nQo=
 =FZcr
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2024-02-29' of https://anongit.freedesktop.org/git/drm/drm-misc into drm-fixes

A reset fix for host1x, a resource leak fix and a probe fix for aux-hpd,
a use-after-free fix and a boot fix for a pmic_glink qcom driver in
drivers/soc, a fix for the simpledrm/tegra transition, a kunit fix for
the TTM tests, a font handling fix for fbcon, two allocation fixes and a
kunit test to cover them for drm/buddy

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Maxime Ripard <mripard@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240229-angelic-adorable-teal-fbfabb@houat
2024-03-01 13:13:06 +10:00
Maxime Ripard
2f91085972
Merge drm/drm-fixes into drm-misc-fixes
Sima needs a more recent release to apply a patch.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
2024-02-26 15:23:00 +01:00
Peter Griffin
0b7c607502 soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs
Some Exynos based SoCs like Tensor gs101 protect the PMU registers for
security hardening reasons so that they are only write accessible in el3
via an SMC call.

As most Exynos drivers that need to write PMU registers currently obtain a
regmap via syscon (phys, pinctrl, watchdog). Support for the above usecase
is implemented in this driver using a custom regmap similar to syscon to
handle the SMC call. Platforms that don't secure PMU registers, get a mmio
regmap like before. As regmaps abstract out the underlying register access
changes to the leaf drivers are minimal.

A new API exynos_get_pmu_regmap_by_phandle() is provided for leaf drivers
that currently use syscon_regmap_lookup_by_phandle(). This also handles
deferred probing.

Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20240220220613.797068-2-peter.griffin@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-02-25 11:39:23 +01:00
Rob Clark
f79ee78767 soc: qcom: pmic_glink: Fix boot when QRTR=m
We need to bail out before adding/removing devices if we are going to
-EPROBE_DEFER. Otherwise boot can get stuck in a probe deferral loop due
to a long-standing issue in driver core (see commit fbc35b45f9 ("Add
documentation on meaning of -EPROBE_DEFER")).

Deregistering the altmode child device can potentially also trigger bugs
in the DRM bridge implementation, which does not expect bridges to go
away.

[DB: slightly fixed commit message by adding the word 'commit']
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20231213210644.8702-1-robdclark@gmail.com
[ johan: rebase on 6.8-rc4, amend commit message and mention DRM ]
Fixes: 58ef4ece1e ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
Cc: <stable@vger.kernel.org>      # 6.3
Cc: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240217150228.5788-5-johan+linaro@kernel.org
2024-02-23 17:03:52 +02:00
Johan Hovold
b979f2d50a soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free
A recent DRM series purporting to simplify support for "transparent
bridges" and handling of probe deferrals ironically exposed a
use-after-free issue on pmic_glink_altmode probe deferral.

This has manifested itself as the display subsystem occasionally failing
to initialise and NULL-pointer dereferences during boot of machines like
the Lenovo ThinkPad X13s.

Specifically, the dp-hpd bridge is currently registered before all
resources have been acquired which means that it can also be
deregistered on probe deferrals.

In the meantime there is a race window where the new aux bridge driver
(or PHY driver previously) may have looked up the dp-hpd bridge and
stored a (non-reference-counted) pointer to the bridge which is about to
be deallocated.

When the display controller is later initialised, this triggers a
use-after-free when attaching the bridges:

	dp -> aux -> dp-hpd (freed)

which may, for example, result in the freed bridge failing to attach:

	[drm:drm_bridge_attach [drm]] *ERROR* failed to attach bridge /soc@0/phy@88eb000 to encoder TMDS-31: -16

or a NULL-pointer dereference:

	Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
	...
	Call trace:
	  drm_bridge_attach+0x70/0x1a8 [drm]
	  drm_aux_bridge_attach+0x24/0x38 [aux_bridge]
	  drm_bridge_attach+0x80/0x1a8 [drm]
	  dp_bridge_init+0xa8/0x15c [msm]
	  msm_dp_modeset_init+0x28/0xc4 [msm]

The DRM bridge implementation is clearly fragile and implicitly built on
the assumption that bridges may never go away. In this case, the fix is
to move the bridge registration in the pmic_glink_altmode driver to
after all resources have been looked up.

Incidentally, with the new dp-hpd bridge implementation, which registers
child devices, this is also a requirement due to a long-standing issue
in driver core that can otherwise lead to a probe deferral loop (see
commit fbc35b45f9 ("Add documentation on meaning of -EPROBE_DEFER")).

[DB: slightly fixed commit message by adding the word 'commit']
Fixes: 080b4e2485 ("soc: qcom: pmic_glink: Introduce altmode support")
Fixes: 2bcca96abf ("soc: qcom: pmic-glink: switch to DRM_AUX_HPD_BRIDGE")
Cc: <stable@vger.kernel.org>      # 6.3
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240217150228.5788-4-johan+linaro@kernel.org
2024-02-23 17:03:46 +02:00
Arnd Bergmann
fe514e1775 RISC-V SoC driver fixes for v6.8-rc6
A fix for a kconfig symbol whose help text has been unhelpful since its
 introduction.
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZdYoDAAKCRB4tDGHoIJi
 0sUcAPwLS5QvKXEleGgXZDN+c1s69PB6cozGLzBhaAuq2ro1EQEAqSLINUafm7dV
 vViH9CYjVivLTYzdwNLfVBvlTO+ZuQk=
 =Z6rj
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXYlWMACgkQYKtH/8kJ
 UiesIg//U4pVwREaqK6bNcWITIdJOnTDCDqLUQ0qBswTtmb4N4yYsUtKp2YqF2JQ
 wGUEVAn2xM6YjsLcQWdCAuwcDcWwdz++VdHGdUlL5t6D1K8PM7Upam0AdCiSyrQE
 QoaKdAUMXyVkoVvJJbIBU7V6Sz9lDd3kTvjAVLNgvrwPY8DKXLMqShz0qAmICpw4
 uw5508yZYKCKdfitAkJoQZeBhjwD4+6AjEH6cCK1hY93jYLHlnqxbfGNHC7glPxI
 5a4D+PZ+OI/X6oVzF5s9pu1fpz+kyglo9aF3Z7QsJbhmzn//ydMny3W3kw8t16AC
 lExs889mcADBSfkFDnGEzx8VTNPZuSyVylQL0JSGXnG9Yr9PTRcaQnoLckxetAVh
 yAGUVN3axrYeWDfh5Ufyzcdi9UWwQl8NPh5l2Kf9sK72h4Cokarks3n4TdSbJMuH
 3cj0nLuB44ui86Y77S1a29Lm/nSPU6hhp4WUlnQhpASxibjZI2Cn8SaWKkQJCOkL
 Bi49UQp7geS3ppgx5t9pKqJ9SxBPpVGTZZ1arV+igsszJpcOo7/5l2QyzMNdsLxI
 20So+FXrtDGy5nWyiuqZX7PLY0Fhh6tqMbh6+fPP2a0eOU9WZjz5y2uf21yifzIj
 8dtyE3jFYb9E8Tc57rw2DiQ6d/Yr7q9jTvBXkLkO3yfdZ1D7BPo=
 =Xybl
 -----END PGP SIGNATURE-----

Merge tag 'riscv-soc-drivers-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes

RISC-V SoC driver fixes for v6.8-rc6

A fix for a kconfig symbol whose help text has been unhelpful since its
introduction.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

* tag 'riscv-soc-drivers-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  soc: microchip: Fix POLARFIRE_SOC_SYS_CTRL input prompt

Link: https://lore.kernel.org/r/20240221-irate-outrage-cf7f96f83074@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-02-23 13:53:54 +01:00
Arnd Bergmann
6e66213fd5 Renesas driver updates for v6.9
- Initial support for the Renesas R-Car V4M (R8A779H0) SoC.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZcYuwAAKCRCKwlD9ZEnx
 cGo9AQC3eWubHoOL3cfOo9m51KhD6sHqp7HtdLphkIJvezbYDwD/d2IsqBUqnpWG
 QwdXTxGPkcFWdCYo7rwSkBL/6W3uyAI=
 =vDJf
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXVEtoACgkQYKtH/8kJ
 UicqtA//YAy0MHXf8vjKb/fThWrUA8rkmbQAGLQ5tbC6OmQIRocxHTyPGeWin+fg
 Sf0xDO70efcyzl8nFMCbk18hrf9t4fHixDg/sdizUNO2l90Af7mHI7tZmN/WPW6z
 B0XREa9Kp7MfIfhMeGTlT+Tm8R3WhlzNZZ3A7tkK0LCBZu1J9Fqfynn8PylwFynj
 X/H5gfY46cAUnO06j8kpdEy7df3BW8+WfkmIw0RApn+91bN6xcR4qO1e4lMmXGdZ
 uCxVSUxfJQ4qd5Q//nSRdp6iYZGBKWd9v+zHg279nGu1rpo9snXvuQInruljSdJ9
 6W24EdacVXydk2YTkLzmfUXOAEH6H7k1IkgV3pA/BO3Z4F5Aiue88bitG7kPabqW
 dpRhenvUamepBbZVcwkiXskB39eoQcq13kcJYBeUYmywuv0ts7i1Ez8QridgvgT4
 bw65/6GZ/tM9avZqBf4v52/bQYX1fv7ohoBe/DTVi95p4SVKmRCGDZx0Gbx85q+2
 GOu2ir4WIHZl4S+wrwtWXoSPB1K9hnM9zYyZNkBrTo2jM7NfuBu8WJP+A4wTv++2
 GERbcHsd7tgZIx/pQI44MEmJ6GjNPD83e6wRueFEzACzanC/u2Mfq7spWOBWXkm0
 YYz723etFBWm0i9I1OxYrszhSEnZdejBV+46w0afI0S5mvPE8RU=
 =cDa0
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v6.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers

Renesas driver updates for v6.9

  - Initial support for the Renesas R-Car V4M (R8A779H0) SoC.

* tag 'renesas-drivers-for-v6.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rcar-rst: Add support for R-Car V4M
  soc: renesas: Identify R-Car V4M
  soc: renesas: Introduce ARCH_RCAR_GEN4

Link: https://lore.kernel.org/r/cover.1707487830.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-02-20 22:00:10 +01:00
Dmitry Baryshkov
6496dba142 soc: qcom: spm: add support for voltage regulator
The SPM / SAW2 device also provides a voltage regulator functionality
with optional AVS (Adaptive Voltage Scaling) support. The exact register
sequence and voltage ranges differs from device to device.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240102-saw2-spm-regulator-v7-5-0472ec237f49@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-02-16 11:30:57 -06:00
Dmitry Baryshkov
57e2b067f1 soc: qcom: spm: remove driver-internal structures from the driver API
Move internal SPM driver structures to the driver itself, removing them
from the public API. The CPUidle driver doesn't use them at all.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240102-saw2-spm-regulator-v7-4-0472ec237f49@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-02-16 11:30:57 -06:00
Prathamesh Shete
ae7d2d9b8e soc/tegra: pmc: Add SD wake event for Tegra234
Add SD wake event for Tegra234 so that system can be woken up from
suspend when SD card hot-plug/unplug event is detected.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-16 12:35:56 +01:00
Petlozu Pravareshwar
ccd8e76fdb soc/tegra: pmc: Update scratch as an optional aperture
Scratch address space register is used to store reboot reason. For
some Tegra234 systems, the scratch space is not available to store
the reboot reason. This is because scratch region on these systems
is not accessible by the kernel as restricted by the Hypervisor.
Such systems would delist scratch aperture from PMC DT node.

Hence this change makes scratch as optional aperture and also avoids
registering reboot notifier if scratch address space isn't mapped.

Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-16 12:17:55 +01:00
Petlozu Pravareshwar
6f4429e21a soc/tegra: pmc: Update address mapping sequence for PMC apertures
On Tegra SoCs prior to Tegra186, PMC has single address range only.
Starting from and after Tegra186, PMC has additional address ranges
apart from base address range. Currently in PMC driver, we try to
map these additional address ranges on all SoCs and if we fail then
we assume that the range is not valid for an SoC. This change makes
it more explicit on which address ranges are expected to be present
on which SoCs and maps the additional address ranges only on SoCs
from and after Tegra186.

Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-16 12:17:54 +01:00
Unnathi Chalicheemala
ceeaddc19a soc: qcom: llcc: Check return value on Broadcast_OR reg read
Commit c72ca343f9 ("soc: qcom: llcc: Add v4.1 HW version support")
introduced a new 4.1 if statement in llcc_update_act_ctrl() without
considering that ret might be overwritten. So, add return value check
after Broadcast_OR register read in llcc_update_act_ctrl().

Fixes: c72ca343f9 ("soc: qcom: llcc: Add v4.1 HW version support")
Signed-off-by: Unnathi Chalicheemala <quic_uchalich@quicinc.com>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20240212183515.433873-1-quic_uchalich@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-02-13 23:43:39 -06:00
Danila Tikhonov
c8f349ac13 soc: qcom: socinfo: Add Soc IDs for SM8475 family
Add Soc ID table entries for Qualcomm SM8475 family.

Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240212201428.87151-3-danila@jiaxyga.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-02-13 23:43:11 -06:00
Ricardo B. Marliere
d2e8899de7 soc: qcom: apr: make aprbus const
Since commit d492cc2573 ("driver core: device.h: make struct
bus_type a const *"), the driver core can properly handle constant
struct bus_type, move the aprbus variable to be a constant
structure as well, placing it into read-only memory which can not be
modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240213-bus_cleanup-apr-v1-1-50c824eec06d@marliere.net
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-02-13 23:38:03 -06:00
Bjorn Andersson
a6b15a5ba3 Merge branch '20240201204421.16992-2-quic_amelende@quicinc.com' into drivers-for-6.9
Merge PBS driver through topic branch, to also allow it be merged
through the LED subsystem.
2024-02-01 16:27:52 -06:00
Anjelique Melendez
5b2dd77be1 soc: qcom: add QCOM PBS driver
Add the Qualcomm PBS (Programmable Boot Sequencer) driver. The QCOM PBS
driver supports configuring software PBS trigger events through PBS RAM
on Qualcomm Technologies, Inc (QTI) PMICs.

Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Link: https://lore.kernel.org/r/20240201204421.16992-6-quic_amelende@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-02-01 16:26:55 -06:00
Arnd Bergmann
d820100a1b soc/tegra: Fix build failure on Tegra241
If all the other SoCs are disabled, the driver fails to build:

drivers/soc/tegra/fuse/fuse-tegra30.c:684:17: error: 'tegra30_fuse_read' undeclared here (not in a function); did you mean 'tegra_fuse_readl'?
  684 |         .read = tegra30_fuse_read,
      |                 ^~~~~~~~~~~~~~~~~
      |                 tegra_fuse_readl
drivers/soc/tegra/fuse/fuse-tegra30.c:694:17: error: 'tegra30_fuse_init' undeclared here (not in a function); did you mean 'tegra_fuse_info'?
  694 |         .init = tegra30_fuse_init,
      |                 ^~~~~~~~~~~~~~~~~

Fix the list of SoCs using this function to include the newly added one.

Fixes: dee509eb9cd5 ("soc/tegra: fuse: Add support for Tegra241")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 16:03:18 +01:00
Jon Hunter
81b3f0efbb soc/tegra: fuse: Fix crash in tegra_fuse_readl()
Commit c5b2d43e67bb ("soc/tegra: fuse: Add ACPI support for Tegra194 and
Tegra234") updated the Tegra fuse driver to add ACPI support and added a
test to the tegra_fuse_readl() function to check if the device is
booting with device-tree. This test passes 'fuse->dev' variable to
dev_fwnode() but does not check first is 'fuse->dev' is valid. This is
causing a crash to occur in Tegra XUSB PHY driver that calls the
tegra_fuse_readl() function before 'fuse->dev' variable has been
initialised ...

 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000290
 Mem abort info:
   ESR = 0x0000000096000004
   EC = 0x25: DABT (current EL), IL = 32 bits
   SET = 0, FnV = 0
   EA = 0, S1PTW = 0
   FSC = 0x04: level 0 translation fault
 Data abort info:
   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
 [0000000000000290] user address but active_mm is swapper
 Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
 Modules linked in:
 CPU: 7 PID: 70 Comm: kworker/u16:4 Not tainted 6.8.0-rc1-next-20240129-02825-g596764183be8 #1
 Hardware name: NVIDIA Jetson AGX Xavier Developer Kit (DT)
 Workqueue: events_unbound deferred_probe_work_func
 pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 pc : __dev_fwnode+0x0/0x18
 lr : tegra_fuse_readl+0x24/0x98
 sp : ffff80008393ba10
 x29: ffff80008393ba10 x28: 0000000000000000 x27: ffff800081233c10
 x26: 00000000000001c8 x25: ffff000080b7bc10 x24: ffff000082df3b00
 x23: fffffffffffffff4 x22: 0000000000000004 x21: ffff80008393ba84
 x20: 00000000000000f0 x19: ffff800082f1e000 x18: ffff800081d72000
 x17: 0000000000000001 x16: 0000000000000001 x15: ffff800082fcdfff
 x14: 0000000000000000 x13: 0000000003541000 x12: 0000000000000020
 x11: 0140000000000000 x10: ffff800080000000 x9 : 0000000000000000
 x8 : ffff000082df3b40 x7 : 0000000000000000 x6 : 000000000000003f
 x5 : 00000000ffffffff x4 : 0000000000000dc0 x3 : 00000000000000c0
 x2 : 0000000000000001 x1 : ffff80008393ba84 x0 : 0000000000000000
 Call trace:
  __dev_fwnode+0x0/0x18
  tegra186_xusb_padctl_probe+0xb0/0x1a8
  tegra_xusb_padctl_probe+0x7c/0xebc
  platform_probe+0x90/0xd8
  really_probe+0x13c/0x29c
  __driver_probe_device+0x7c/0x124
  driver_probe_device+0x38/0x11c
  __device_attach_driver+0x90/0xdc
  bus_for_each_drv+0x78/0xdc
  __device_attach+0xfc/0x188
  device_initial_probe+0x10/0x18
  bus_probe_device+0xa4/0xa8
  deferred_probe_work_func+0x80/0xb4
  process_scheduled_works+0x178/0x3e0
  worker_thread+0x164/0x2e8
  kthread+0xfc/0x11c
  ret_from_fork+0x10/0x20
 Code: a8c27bfd d65f03c0 128002a0 d65f03c0 (f9414801)
 ---[ end trace 0000000000000000 ]---

Fix this by verifying that 'fuse->dev' is valid before passing to
dev_fwnode().

Fixes: c5b2d43e67bb ("soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:20 +01:00
Kartik
7a849d0b75 soc/tegra: fuse: Define tegra194_soc_attr_group for Tegra241
Tegra241 SoC data uses tegra194_soc_attr_group, which is only defined
if config CONFIG_ARCH_TEGRA_194_SOC or CONFIG_ARCH_TEGRA_234_SOC or
both are enabled. This causes a build failure if both of these configs
are disabled and CONFIG_ARCH_TEGRA_241_SOC is enabled.

Define tegra194_soc_attr_group if CONFIG_ARCH_TEGRA_241_SOC is enabled.

Signed-off-by: Kartik <kkartik@nvidia.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
8402074f30 soc/tegra: fuse: Add support for Tegra241
Add support for Tegra241 which use ACPI boot.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
972167c690 soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234
Add ACPI support for Tegra194 & Tegra243 SoC's. This requires
following modifications to the probe when ACPI boot is used:
 - Initialize soc data.
 - Add nvmem lookups.
 - Register soc device.
 - use devm_clk_get_optional() instead of devm_clk_get() to get
   fuse->clk, as fuse clocks are not required when using ACPI boot.

Also, drop '__init' keyword for tegra_soc_device_register() as this is also
used by tegra_fuse_probe() and use dev_err_probe() wherever applicable.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
13a6935414 soc/tegra: fuse: Add function to print SKU info
Add helper function tegra_fuse_print_sku_info() to print Tegra SKU
information. So, it can be shared between tegra_fuse_init() and
ACPI probe which is to be introduced later.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
71661c1c8c soc/tegra: fuse: Add function to add lookups
Add helper function tegra_fuse_add_lookups() to register Tegra fuse
nvmem lookups. So, this can be shared between tegra_fuse_init() and
ACPI probe, which is to be introduced later.

Use kmemdup_array to duplicate fuse->soc->lookups.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
7b0c505eb3 soc/tegra: fuse: Add tegra_acpi_init_apbmisc()
In preparation to ACPI support in Tegra fuse driver add function
tegra_acpi_init_apbmisc() to initialize tegra-apbmisc driver.
Also, document the reason of calling tegra_init_apbmisc() at early init.

Note that function tegra_acpi_init_apbmisc() is not placed in the __init
section, because it will be called during probe.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
f0139d6666 soc/tegra: fuse: Refactor resource mapping
To prepare for adding ACPI support to the tegra-apbmisc driver,
relocate the code responsible for mapping memory resources from
the function ‘tegra_init_apbmisc’ to the function
‘tegra_init_apbmisc_resources.’ This adjustment will allow the
code to be shared between ‘tegra_init_apbmisc’ and the upcoming
‘tegra_acpi_init_apbmisc’ function.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Kartik
4569e604b5 soc/tegra: fuse: Use dev_err_probe for probe failures
Currently, in tegra_fuse_probe() if clock/reset get fails, then the
driver prints an error if the error is not caused by -EPROBE_DEFER.
This can be improved by using dev_err_probe() instead.

So, return dev_err_probe() if clock/reset get fails.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:05 +01:00
Christophe JAILLET
9863084dd9 soc/tegra: pmc: Remove some old and deprecated functions and constants
These TEGRA_IO_RAIL_... functions and constants have been deprecated in
commit 21b4991051 ("soc/tegra: pmc: Add I/O pad voltage support") in
2016-11.

There seems to be no users since kernel 4.16.

Remove them now.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-01 15:58:04 +01:00
Duy Nguyen
14656ed72f soc: renesas: rcar-rst: Add support for R-Car V4M
Add support for the R-Car V4M (R8A779H0) SoC to the R-Car RST driver.

Signed-off-by: Duy Nguyen <duy.nguyen.rh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/13dc9f014e27db5092b3cc23edddf4b5e01a6645.1706194617.git.geert+renesas@glider.be
2024-01-31 15:08:41 +01:00
Duy Nguyen
2969768dae soc: renesas: Identify R-Car V4M
Add support for identifying the R-Car V4M (R8A779H0) SoC.

Signed-off-by: Duy Nguyen <duy.nguyen.rh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/31e06d055aec1bc70c3e9a02f9268bcfc72b2204.1706194617.git.geert+renesas@glider.be
2024-01-31 15:08:41 +01:00
Geert Uytterhoeven
ae286bd7e9 soc: renesas: Introduce ARCH_RCAR_GEN4
Currently, all Kconfig symbols for R-Car Gen4 SoCs select the
ARCH_RCAR_GEN3 SoC family symbol, which might confuse the casual reader.

Fix this by introducing a new SoC family symbol for R-Car Gen4 SoCs.
For now this just selects ARCH_RCAR_GEN3, to avoid duplication, and to
relax dependencies.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/a283913ba7a39ec2dae0ebf9fc2b06096f009511.1706194617.git.geert+renesas@glider.be
2024-01-31 15:08:41 +01:00
Chen-Yu Tsai
54d21dea6a
soc: mediatek: mtk-socinfo: Add extra entry for MT8183
The MT8183 has another socinfo match, with the second cell only
differing by one bit. Add it to the driver.

Fixes: 423a54da3c ("soc: mediatek: mtk-socinfo: Add driver for getting chip information")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Acked-by: William-tw Lin <william-tw.lin@mediatek.com>
Link: https://lore.kernel.org/r/20240130095656.3712469-3-wenst@chromium.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-01-31 09:41:43 +01:00
Chen-Yu Tsai
82e5d7d793
soc: mediatek: mtk-socinfo: Clean up NVMEM cell read
The mtk-socinfo grabs the NVMEM device devm_nvmem_device_get(), but then
proceeds to put the device directly with nvmem_device_put() if the read
is successful. If the device fails to probe and goes through the devres
release path, the device would be put a second time, triggering a
use-after-free error from KASAN.

Fix this by dropping the devres part. Since the NVMEM cell data is read
only once, there is no need to keep the reference around.

While at it, clean up the function to directly reference the NVMEM
device node and use that to find the NVMEM device, instead of finding it
by name, which is more fragile. The cell node is always a direct child
of the NVMEM device node, courtesy of the legacy NVMEM cell layout. Thus
of_get_child_by_name() is a better way of finding the cell. Last,
correctly put the device node once its use is over.

Fixes: 423a54da3c ("soc: mediatek: mtk-socinfo: Add driver for getting chip information")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240130095656.3712469-2-wenst@chromium.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-01-31 09:41:43 +01:00
Linus Torvalds
53ed2ac8fc soc: apple: mailbox: error pointers are negative integers
In an entirely unrelated discussion where I pointed out a stupid thinko
of mine, Rasmus piped up and noted that that obvious mistake already
existed elsewhere in the kernel tree.

An "error pointer" is the negative error value encoded as a pointer,
making the whole "return error or valid pointer" use-case simple and
straightforward.  We use it all over the kernel.

But the key here is that errors are _negative_ error numbers, not the
horrid UNIX user-level model of "-1 and the value of 'errno'".

The Apple mailbox driver used the positive error values, and thus just
returned invalid normal pointers instead of actual errors.

Of course, the reason nobody ever noticed is that the errors presumably
never actually happen, so this is fixing a conceptual bug rather than an
actual one.

Reported-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Link: https://lore.kernel.org/all/5c30afe0-f9fb-45d5-9333-dd914a1ea93a@prevas.dk/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-01-30 11:34:49 -08:00
William-tw Lin
423a54da3c
soc: mediatek: mtk-socinfo: Add driver for getting chip information
Add driver for socinfo retrieval. This patch includes the following:
1. mtk-socinfo driver for chip info retrieval
2. Related changes to Makefile and Kconfig

Signed-off-by: William-tw Lin <william-tw.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231222080739.21706-3-william-tw.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-01-29 11:16:10 +01:00