Commit Graph

1169205 Commits (887185649c7ee8a9cc2d4e94de92bbbae6cd3747)

Author SHA1 Message Date
Howard Hsu 7d12b38ab6 wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work
Enable thermal management by default shall not be executed during mcu
init. This causes thermal configuration being reset to the firmware
default settings.

Fixes: 0063b86c91 ("mt76: mt7915e: Enable thermal management by default")
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03 14:47:15 +01:00
Felix Fietkau de19b9c836 wifi: mt76: mt7921: fix deadlock in mt7921_abort_roc
When mt7921_abort_roc is called with dev->mutex held, it can deadlock while
calling cancel_work_sync(&phy->roc_work), because the work function could
be waiting to acquire the mutex.

Fix this by flushing the work before taking the mutex

Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Fixes: 034ae28b56 ("wifi: mt76: mt7921: introduce remain_on_channel support")
Fixes: 41ac53c899 ("wifi: mt76: mt7921: introduce chanctx support")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-03 14:47:15 +01:00
Dmitry Torokhov 4722dd4029 ARM: dts: stihxxx-b2120: fix polarity of reset line of tsin0 port
According to c8sectpfe driver code we first drive reset line low and
then high to reset the port, therefore the reset line is supposed to
be annotated as "active low". This will be important when we convert
the driver to gpiod API.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-02-03 14:41:50 +01:00
ChiYuan Huang ab8174bbc3 Documentation: power: rt9471: Document exported sysfs entries
Document the settings exported by rt9471 charger driver through sysfs entries:
- sysoff_enable
- port_detect_enable

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
[update kernel version and date]
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 14:39:20 +01:00
Jon Hunter 052bfe6ec7 dt-bindings: phy: tegra-xusb: Add support for Tegra234
Add the compatible string for the Tegra234 XUSB PHY.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230111110450.24617-3-jonathanh@nvidia.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2023-02-03 19:06:30 +05:30
ChiYuan Huang 4a1a5f6781 power: supply: rt9471: Add Richtek RT9471 charger driver
Add support for the RT9471 3A 1-Cell Li+ battery charger.

The RT9471 is a highly-integrated 3A switch mode battery charger with
low impedance power path to better optimize the charging efficiency.

Co-developed-by: Alina Yu <alina_yu@richtek.com>
Signed-off-by: Alina Yu <alina_yu@richtek.com>
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 14:35:18 +01:00
ChiYuan Huang 2bc68e5881 dt-bindings: power: supply: Add Richtek RT9471 battery charger
Add bindings for the Richtek RT9471 I2C controlled battery charger.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Co-developed-by: Alina Yu <alina_yu@richtek.com>
Signed-off-by: Alina Yu <alina_yu@richtek.com>
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 14:35:18 +01:00
Arnd Bergmann 426082a214 Introduce MediaTek regulator coupler driver to ensure that the SRAM
voltage in par with the GPU voltage. This allows for a stable use of the
 GPU.
 
 mtk-mutex:
 - add support for MT8188 vdosys0 path
 - allow it to be build as module
 - add support for MT8195 vdosys1 path
 
 mmsys:
 - add MT8188 vdosys0 path
 - allow to be build as a module
 - add MT8195 vdosys1 path
 - add support for CMDQ
 - allow for up to 64 reset bits
 - add supprot for the MT8195 vppsys[0,1] pathes
 
 pm-domains:
 - keep power for the MT8186 ADSP on by default
 - add support for MT8188
 - add support for buck isolation needed in specific pm-domains for
   MT8188 and MT8192
 
 mtk-svs:
 - enable IRQ later to allow using kexec
 - several improvments on the code base
 - fix modalias
 
 pmic wrapper:
 - convert binding to yaml. As this is thightly coupled to the MT6357
   PMIC, I took patches regarding it as well.
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmPaoLsXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH44bw//Wpo6qdxzTOOEGkzdD7JairN5
 ozPZyIiSTcg+zVWNJ5sbMMe3xtjIXJVpzI3yfJtx4BTtjns1FNsLeLpVKrS1RVd+
 fiSAmhrioYUHk7H599tArs4H+5h1lJkcpf1X+7fX5mc9yCQSsAmAcVeFA5TMbKpS
 wdr460r7sUZtSLSVLHza1R7k4V3OLHzMzSztBTtgryE/rV9y/1rQ3hb8aiEgu4h1
 5igUDXJfzsmGc45UxCaWZnrziREhSMWe0kc4eGDQSGL6Nc/mjZ9wjhDDnzfcwDTE
 mkvTEAgiS6Jh/hoqHmwyzTO3lZRTIxOc/d5eKTzwk3z7fglGt35wN6jJRHC7Utwx
 aSt4x8R+3CrlUaAY2FC/1oxt3ONbcLqxPGVUTbvQYxCeXSTagEok1PxyKZZl1bKe
 XYbJfm0q9tujxItgbF79j6UD0eWVZ9/UM68gkiaUfZ3AYQdLh9J7nqPScu6UqRR5
 5gCeLm41/BOrnObmpv0g6VcGfpIjej8gfJinDLgcjUMW8nv38UpglUojeFJutT7b
 BGMmSC/GR57d2NmhGkWSgdYsjrU6iADf936WdKSSfYswkxrOWLgYSd41bym1fluK
 JxUYJga4S6Xu3Pjj9vbX60Vi7d9LitEuyAQbi540TP148NjBs0d29puhOGK8USPh
 z+Jaoaj+j6XSSg0fotQ=
 =8+S0
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPdCowACgkQmmx57+YA
 GNknYQ//X3Eg6K4AM3EJ2eKuVyVbqChPwTo1SGgyKb2GpTCvkHlb9yNfKe+LluA8
 /KLm7bmvpyTA0yegXmjMNo0HmHw5Qu5wsWTdb74JifAWaH9kh+8AGRptFZO+4bzx
 /Twj3ZkqqTqzI+NETRcL13sVIEE8y+iGRBVUi8kIxQVS7BYbuBUc0gkgEfbYEfIB
 sLa+swF9NT/h8cd0jg4TJqTL3F6pUr28JzGcg5fs5JH0WqSkbxELJcW65x73OCdW
 RjU9ioLVKDjFq6m/6KEq7QzWb35ebItG4yLSH6nwT9l7B/KV9pC0TIapiKLlne0N
 HlerHU512ynbvtSo+8zyL+gKGiPvQqxyLb/Sd669edSqeCASi8dlKcwxT/boldzu
 JZLf7qBJR5X8BLrFp8RhWs2D3Mockq8aXc4WGNPnzuvOvRQrl5sfkH8spl2pjkT+
 rd6i77IWd+munKldZzFwwDlAhvmpPFWA1F3ogViFiLsy17UwId2AO37FGPbtZ7BL
 xqJIkLAqfXqUri6KM/MFC5njbWimIfDKmsmQ+FA8DMO7+OFnnNEVKewp63XcOv+m
 mXkUzoMHnG6GB7tQie5AbwD4RKE14Rr1uiYZRRfdht+zreYYEvqfbowU2dL3OTnr
 EVnXNSUChOKfW4OBUrX6nKbvni0ffzRaC+aLyBdE8yqMCr7v1RA=
 =fPm5
 -----END PGP SIGNATURE-----

Merge tag 'v6.2-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/drivers

Introduce MediaTek regulator coupler driver to ensure that the SRAM
voltage in par with the GPU voltage. This allows for a stable use of the
GPU.

mtk-mutex:
- add support for MT8188 vdosys0 path
- allow it to be build as module
- add support for MT8195 vdosys1 path

mmsys:
- add MT8188 vdosys0 path
- allow to be build as a module
- add MT8195 vdosys1 path
- add support for CMDQ
- allow for up to 64 reset bits
- add supprot for the MT8195 vppsys[0,1] pathes

pm-domains:
- keep power for the MT8186 ADSP on by default
- add support for MT8188
- add support for buck isolation needed in specific pm-domains for
  MT8188 and MT8192

mtk-svs:
- enable IRQ later to allow using kexec
- several improvments on the code base
- fix modalias

pmic wrapper:
- convert binding to yaml. As this is thightly coupled to the MT6357
  PMIC, I took patches regarding it as well.

* tag 'v6.2-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (41 commits)
  soc: mediatek: mtk-svs: add missing MODULE_DEVICE_TABLE
  soc: mediatek: mtk-devapc: Switch to devm_clk_get_enabled()
  soc: mtk-svs: mt8183: refactor o_slope calculation
  soc: mediatek: mtk-svs: delete superfluous platform data entries
  soc: mediatek: mtk-svs: move svs_platform_probe into probe
  soc: mediatek: mtk-svs: improve readability of platform_probe
  soc: mediatek: mtk-svs: clean up platform probing
  soc: mediatek: mtk-svs: keep svs alive if CONFIG_DEBUG_FS not supported
  soc: mediatek: mtk-svs: Use pm_runtime_resume_and_get() in svs_init01()
  soc: mediatek: mtk-svs: reset svs when svs_resume() fail
  soc: mediatek: mtk-svs: restore default voltages when svs_init02() fail
  soc: mediatek: mmsys: add support for MT8195 VPPSYS
  dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS
  soc: mediatek: Introduce mediatek-regulator-coupler driver
  soc: mediatek: mtk-svs: Enable the IRQ later
  soc: mediatek: add mtk-mutex support for mt8195 vdosys1
  soc: mediatek: add mtk-mutex component - dp_intf1
  soc: mediatek: mmsys: add reset control for MT8195 vdosys1
  soc: mediatek: mmsys: add mmsys for support 64 reset bits
  soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1
  ...

Link: https://lore.kernel.org/r/396d51fc-81f3-4a2b-d7a7-b966bfe3002a@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:22:19 +01:00
Chen-Yu Tsai 97801cfcf9
arm64: dts: mediatek: mt8195: Fix vdosys* compatible strings
When vdosys1 was initially added, it was incorrectly assumed to be
compatible with vdosys0, and thus both had the same mt8195-mmsys
compatible attached.

This has since been corrected in commit b237efd47d ("dt-bindings:
arm: mediatek: mmsys: change compatible for MT8195") and commit
82219cfbef ("dt-bindings: arm: mediatek: mmsys: add vdosys1 compatible
for MT8195"). The device tree needs to be fixed as well, otherwise
the vdosys1 block fails to work, and causes its dependent power domain
controller to not work either.

Change the compatible string of vdosys1 to "mediatek,mt8195-vdosys1".
While at it, also add the new "mediatek,mt8195-vdosys0" compatible to
vdosys0.

Fixes: 6aa5b46d17 ("arm64: dts: mt8195: Add vdosys and vppsys clock nodes")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20230202104014.2931517-1-wenst@chromium.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:19:53 +01:00
Arnd Bergmann 07975ef0fa Fixes to adapt to correct binding behaviour and fixes for devices on some boards
Most notably may be the adaption of lower thermal limits for the pinephone
 pro, where the original hiher ones could result in (possibly permanent)
 display issues.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmPapWIQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgVu4CACD6VNbu005k/Ot8wN3jIzJPicgz9Z6QfSM
 xH0OBYQ037O833wGJYKosQT+azQaUrzMVRrO2hPhdAKR8OXbD4m5k7EySQzNgsNT
 bG1ONkBD+ZLT04K3aYL+lg/ty0UE88/GeVMG/CP7tuCNkvvel5Gqt9WLDeNOC5Md
 oPrkGP+SGT97A6QSkjTTwphlaze7zBBMPVPR2buJRaKrRFrwoTERE7zglZ/9ZFaJ
 gB5o+y1fjTUKtD9fFZ0ch7yHHx3T5GIh1Lzxm+wpfMwsFOwl9k4PGN0dS/pu93gm
 zYY535P/gUY8gzsb8rde+kFVEvAF4PIJBMjVkKfHNGfDG6YSWO+T
 =qX0n
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPdCbEACgkQmmx57+YA
 GNlyKBAAojNNEBz3h/2hUTI9atcR6TgACw4YFSGeuQhua0b952wHIds1ugt10qas
 O063c4rqUJnBOjhFvxJ8zdpmN0+/8byjneZsQGKX0tV8QgRHuL2cWEDqMNpd74cm
 x2oBlctKImkaDISR4xRBNVzdiYWKQ4KogjMKOeWC2gObPPK4LQ9/gEcJIxo4sWy6
 3yA+K8gjOurnnOqOuU+f3XfY0kEdLgEtZn5ii8T26tj/RR7Q3qxoGh0YWRfQoSLE
 uw1TSBQDTCPM+6gudIs1WUWeSm0plSGHtY7srrpzvdfoRq9l3y7VFlD+cyNP1luF
 N+X2ytZyDlowC4EUHORoF7wBzT9QnfwAa5EY9+QHnh4wE6lyhfSxGWCzVMHHY7pq
 7SkaUTgaItrWgDt0neXu3gpcVLvNkRONbmYGttG1oot+rQgnk9hYMovDKknMu+2w
 jrmsrdBYj2fFckIEPd1gJ3Ws5oMubavvYZuh1NI8r+S4EC8pbaKxFN51gsfdE53s
 1mmhvFLm6cQ1IxPSllpiAD+JRVFCHfMH+k2hDY3VjyEIcXcSdK+unPH/iLtSa+fi
 6EIybQ0iYmMeHBTzUAAEv6qLgN17OzIPUDlWG8xH/b2fAe2nBlFVWQjKJbbZ1wsa
 Wsa41bGba9QFK0HoHafzpA3xqy1KpgHiXVa4ZDWIfgAEf+ta6hM=
 =5IlC
 -----END PGP SIGNATURE-----

Merge tag 'v6.2-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes

Fixes to adapt to correct binding behaviour and fixes for devices on some boards

Most notably may be the adaption of lower thermal limits for the pinephone
pro, where the original hiher ones could result in (possibly permanent)
display issues.

* tag 'v6.2-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: align rk3399 DMC OPP table with bindings
  arm64: dts: rockchip: set sdmmc0 speed to sd-uhs-sdr50 on rock-3a
  arm64: dts: rockchip: fix probe of analog sound card on rock-3a
  arm64: dts: rockchip: add missing #interrupt-cells to rk356x pcie2x1
  arm64: dts: rockchip: fix input enable pinconf on rk3399
  ARM: dts: rockchip: add power-domains property to dp node on rk3288
  arm64: dts: rockchip: add io domain setting to rk3566-box-demo
  arm64: dts: rockchip: remove unsupported property from sdmmc2 for rock-3a
  arm64: dts: rockchip: drop unused LED mode property from rk3328-roc-cc
  arm64: dts: rockchip: reduce thermal limits on rk3399-pinephone-pro
  arm64: dts: rockchip: use correct reset names for rk3399 crypto nodes

Link: https://lore.kernel.org/r/3514663.mvXUDI8C0e@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:18:41 +01:00
Arnd Bergmann 3e47c0dfc7 mvebu dt64 for 6.3 (part 1)
Do not use anymore "marvell,armada3710" compatible string for the
 Armada 3720 boards.
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCY9vWYwAKCRALBhiOFHI7
 1f9gAJ9Tf8qcA0sTnJLCO1VPz+VUIB3/2QCgqApD3HzDY7r/2uzc4q6kqWqVAaE=
 =zT7+
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPdCKwACgkQmmx57+YA
 GNl5hQ/8DswRn0PMbLm3owJPSPSnEZYqtA8YGeuDZxtADWtSdjIuawXjCcUeVAZ6
 zSsnTqDz9tWwO0yOumgVrHfSeEQqSP6WCZTRyEqDFKmFvLhXJn/e/nnD35pjTELH
 jeK26hcASX9No+gtw+SLIpQ3VRfj5XmWh6JdU7yZT0VBK1SFkMjDOQgyMpQ+sfQv
 49Y9OQG4fO+GuzJqNJcf+0Ck5HI/u1RVEKtcFyhNpFcI8cKoWBVee89BJ1MYn9Mw
 M3190A1+UO8vyLXo/w9Ecm8XZlK6iHJDk8mQzX/nUoXSERcZF/gjAlNxef/BxK2s
 TPkBkUTfp/P2zPQSpRmC6IonLM+bJ9tt0wZLUhP4qetiJNNG20AGal8DeD/uy7nV
 btUggmjxx+mbJIabUasobufnqlZSvrpj2RSzNdrtB8ZrOuerqsIKA9Fu46AjQFT5
 tjOQLs05PSG3nx7k6X28gE4KYCL9SZaK+SWxDmqPdNkwmhBLN9Ye9ytLW4L+CJBv
 cmSpPfQ/qDetFuaSPyUiyy99Bee2XGF0V1cXvfRR7oQe5iXTFza+S6ywnyTcLaxB
 ww9+thNMK+ZvhHSt3rFVo6SumUGIltE9OzHbubtzuekAlUsG4I9skukWHOXlJmnf
 iYGx2MNIzWI7dQe8QnyAlTE2MVmWx162Jsk7dADpcChtWSvieB4=
 =oCeE
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt64-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt

mvebu dt64 for 6.3 (part 1)

Do not use anymore "marvell,armada3710" compatible string for the
Armada 3720 boards.

* tag 'mvebu-dt64-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  arm64: dts: marvell: Fix compatible strings for Armada 3720 boards

Link: https://lore.kernel.org/r/87zg9w9j6l.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:14:20 +01:00
Arnd Bergmann df5bc88fa1 mvebu dt for 6.3 (part 1)
Fix errors reported by dtbs_check on dove boards
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCY9vV4AAKCRALBhiOFHI7
 1SHYAJ9rkmvzRPUDBEE+nlwskG/J7+jJ6gCgh44affjWovbVlKCu+qhxqxeHeD4=
 =MFwN
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPdCIwACgkQmmx57+YA
 GNkcJBAArYdn3juS/yOTUt8sFI5zFILdg17KChVRwK8XV63gXcGkIphYQsEKUMl+
 87wVhhI1ex/vRfWkKuzg4nvZY1nJ5a94yCpUCMOf3sxTSzT4Pw6KkdVcQtGW7B9g
 7nNt4tUJJnrZrQ6Fsh/xv6hzNrhX6SYWr8AjLLjWkX0/TLQaEssBobjAW+nw8zPk
 jfJxwUo9cmsJ13pcjfdmYydflrQHIXE09KEoaZjITMnwesB23HmfEzK5vM64n34J
 hz753BWdcHqkZ4POpqA1+3x+ToQXB636PEUpLi0ocB6U6kMuHYnpZzYw0/OJ1FEx
 e27/AMMXK6Vq+59VsZZ3JusNbb/9OrQrl2F0/gcbbvDf6yYEJ8eW/iuFUYOyOJ5p
 2ycpDPbiYIqJgUxVlqcM1UFFIpUNCs51jnTbUECDlBWzr+17GcuVML6KiYdNhRzD
 2MhToiJdUetrABTPpI1+N286NhHGXYfHpYxoX7x2BuMMCC2vzx32z4ajOAoWR4yr
 mQEY2D+X4Pt/0gLEqpYZg6tqcRmPgFCJyk6IrWuHPlZgUFkZ7pD4bApuVdlywdGb
 xXTgIx/F6eQsI5X+27Nq/YdAXycIKTSRsONIWcP9yuxMz5kUFSFu5TWfVLjI7Vs+
 X0SejFeMJ17RXPEKHh7yyyUKiIV2Hy8/88xz8hXcuJoZ4yENKNc=
 =cMCA
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt

mvebu dt for 6.3 (part 1)

Fix errors reported by dtbs_check on dove boards

* tag 'mvebu-dt-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  ARM: dts: dove.dtsi: Move ethphy to fix schema error

Link: https://lore.kernel.org/r/87357oaxs0.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:13:48 +01:00
Arnd Bergmann 34b84ce9c6 STM32 DT for v6.3, round 1
Highlights:
 ----------
 
 - MPU:
   - ST boards:
     - Add following peripherals support on stm32mp13:
       i2s, SAI, SPDIFRX, DFSDM, Timers
     - Add timers support on stm32mp135f-dk board.
     - Add decicated BSEC compatible on STM32MP13.
     - Rename sound card on STM32MP15 DKx.
     - Fix yaml validation issues.
 -----BEGIN PGP SIGNATURE-----
 
 iQJRBAABCgA7FiEEctl9+nxzUSUqdELdf5rJavIecIUFAmPbsYAdHGFsZXhhbmRy
 ZS50b3JndWVAZm9zcy5zdC5jb20ACgkQf5rJavIecIXrvBAAhUPIUXT6kh7/zW56
 9VHH+SPZJlsSC6tGlLuxmtyHtoFSO9du8ly4N0RwY3yryMAcSfhtmefx+YhdgbYy
 OPY5k9jWxH1c6Gg+NaRGxO94CIe4ckjSMrYWMWNRS9KN85zV8Ki52yoingQTwn1I
 Bb/C7VIv60WYvX7wR/NqWRCS/RHUCq7QM5IYrqz9oU8IqjoI+Wjmi6eudExtL2QY
 QyGM+lzQGpcdRB69Ob+9VK6jKZESSPyc/mvRwXSEASy2MH0lQ4LOBcKPCqSuHbZ9
 E54k7x1gcRhTdC6SAiEjQIpMLve65s7MBRwrPYZWlOrR9LhuCRD4YqrGl1ElabHL
 bJ2cXL8uYr/lAxynCeznjsU87WXhPpM4r5+bv9AnMotDMnrPBP4YFVbUq7FIrI1B
 r8MW+aMxvvPwyFEHfXISJIcySOHUDo0jRVXIzmz/34RiZWU19wslnBKrUWa4fBkj
 eknsU84kfmcNqu8pjW3B7DlOCjgoDAUlU25KpZAnR2Y3MvlRdTK34+2kNGJpU7lg
 HzBBNpXAiK9cCVenEHdx4nX+3ufgu53LvUKyfKk29sPQjwxSFXZmySr0537q9ZaZ
 lS+JFET8JpJvtrqhRiVxcbmHQ3+zsQca56TT+RVw8MmlbAVeCz8Voh5mMwMGxeW3
 UEUhumCNsOW1oJsgBCNXWn+BFPo=
 =vPxF
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPdCCUACgkQmmx57+YA
 GNlFRw/9HAul0Z2vB/7qBlEDckVe4OGyXkxDdCdj1TYSJ5KYQ9d5oCDjg7UOHjT8
 TAV5mzXV/CWQ8pzD0e+XjWm1/e5LF5zQeRxsGdDpPUiggYIGOM/2So8cdikFDeH7
 f4PYSn8YBQfZWIspbeCX+dNBiu0p9WA3vIjZk+Vpuvd7jnykyG3ohs0hwUDeQa36
 BsKU4TyXXUYxY8WmsiOrcZHNFqgMwwZeEW4L8l+rK47r8tWEP2E1NeJpgS2f6A4N
 OA1MF57YserXIX+9UaiSJljfJZiMK6yyYG5RemWC36oF2NqR1j/23dG2OjF8HOep
 o554CuU8AKwS4ukwrLFx6wd20t13DlW6Lbe2uFCpFc5PlI/eNcv+bw5XXLL3P6Gz
 uJ2wIDB+E4xSS3Yzca8eBxsCgIKvjEzxbrIHbyW1ygNjagrqP1cxZ2G0ZAldYDrT
 qSsS1e0AS/f17Sy40Laxe7Z2HSMtifabk8cPmxfMB1TraRs2/iCHGHyaRTo0ATjV
 kpIjiHtJR4d8o/yRssjURlvrqxns1qpfdoAN2FEghdui10c2RG7xTfPSkxinmHcX
 zSEfxYPzIXioLXJpq6HW26zNonh2GoBOSsQ29pzbLXp1O5udpMQr/JBjaJ5mzoZO
 9bw+9dbR4Y1dsR3u+3qm1DuB0Wr5BlHTbBqPM8IDktqTabV7V9I=
 =b+2r
 -----END PGP SIGNATURE-----

Merge tag 'stm32-dt-for-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt

STM32 DT for v6.3, round 1

Highlights:
----------

- MPU:
  - ST boards:
    - Add following peripherals support on stm32mp13:
      i2s, SAI, SPDIFRX, DFSDM, Timers
    - Add timers support on stm32mp135f-dk board.
    - Add decicated BSEC compatible on STM32MP13.
    - Rename sound card on STM32MP15 DKx.
    - Fix yaml validation issues.

* tag 'stm32-dt-for-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32:
  ARM: dts: stm32: fix compatible for BSEC on STM32MP13
  ARM: dts: stm32: Update part number NVMEM description on stm32mp131
  ARM: dts: stm32: Use new media bus type macros
  ARM: dts: stm32: Fix User button on stm32mp135f-dk
  ARM: dts: stm32: add timers support on stm32mp135f-dk
  ARM: dts: stm32: add timer pins muxing for stm32mp135f-dk
  ARM: dts: stm32: add timers support on stm32mp131
  ARM: dts: stm32: add dfsdm node on stm32mp131
  ARM: dts: stm32: add spdifrx node on stm32mp131
  ARM: dts: stm32: add sai nodes on stm32mp131
  ARM: dts: stm32: add i2s nodes on stm32mp131
  ARM: dts: stm32: Remove the pins-are-numbered property
  ARM: dts: stm32: rename sound card on stm32mp15xx-dkx
  ARM: dts: stm32: remove sai kernel clock on stm32mp15xx-dkx
  ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp151a-prtt1l
  ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp157c-emstamp-argon
  ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp15xx-dhcom-som
  ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp15xx-dhcor-som

Link: https://lore.kernel.org/r/3e815504-e85e-cbd3-6e6d-4e5a7aa7469a@foss.st.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:12:05 +01:00
Arnd Bergmann eacef7cc52 Two new 32bit SoC were added, the rv1126 and rk3128.
New boards are thr rk3128-eval-board, and a number of rv1126-based compute
 modules from Edgeble AI.
 
 Also included are some dt-binding improvements with relevant Acks from
 maintainers when the changes touch these areas.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmPapsgQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgU8SB/oCQymVxzPs3uJc9c+qFzB1Jnfja2BKQTmf
 zVTHjgfekCe39CdnwuFBgFni0GMrx5gbz/aO4x5L1sXL0ov6AhwMU1PVe3cFYH28
 Q0xxDtYiv8r7lFEo2S53SlYn2+J7hFlgzl1hksfU4x02BzXdVJbun2D14fFayz+l
 1CuezLmvZvqRYocIvh+cb7tvv0drAhyD/ffeTGinmg9Srw5r8cBIuSID/Nx7AooD
 gTV93OqQMXNHSaDPxRWUVL1nhhBb2vVu81rvpkqHp8RN/vKjtx6X9dgbHvlkXRDf
 JwW7UrfvULvoc3kihqsa1Cd4atOSxjjNb0wPRfnHmvIhEEvF3cTs
 =LbaR
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPdB+wACgkQmmx57+YA
 GNnGQA/6A8St7bfxRtpWzmCY8D/fSo12vVWRsuTSFClsw+bsuciE+0xptaEbrSeJ
 yjSTOaSIaOrB2mCdXHcgr/QITggcykwrStFXVRWrtp6Bf/ePkrSR8AqHnopst494
 p4oLUX9V1nreYmym85i76gmg81Ka1Qai40wrzTWtJamobeTt8ssspN7qNSkncCb3
 VC3woUNG0b0zydoCZfETykG1aniJTXxyWPLjIJnmiopX269iOU7/J9fx2WMn90hE
 JDon4DjjdRz8Gu0xCQ9nsR06571XjtTU4Bk4A8JfXi/qeccvTsaBMmMeZ14hMtAU
 4SjvqnxbsoPU9thQFqwXJrcRSDI6hiuUZpMONdBF5BtlsYy8auE9Fkr/boyUt97j
 u2z3G05nIO4dmnGfL028GMcbf9rLQgRskxeIgCyIBcj8MpjVONRXaYJqzIdyYy9q
 +70heMagnvAAqOgRtIOJ+C8Plm9FPYb+ubpWk6+KyKCZZ/DmA7TQ9hhd+oYsRfwa
 hCZgT3wyUSi7OBoc0yEsL9Sh36iqEcU7ZlyAD4/wo7hggc5gR88+rZyp3cOQNF8j
 CyYBIJkiHjVJQyMeha9uGTw1FgQM+7Eh3rJE1SAK/w0VtcEfuwQaiuk+xHCuZiAG
 7sP/ga7KB6sjbrfP/Iz6HLuNCwHScrbn/5SzqH1YV9wauu+Kbxc=
 =Ce+W
 -----END PGP SIGNATURE-----

Merge tag 'v6.3-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt

Two new 32bit SoC were added, the rv1126 and rk3128.

New boards are thr rk3128-eval-board, and a number of rv1126-based compute
modules from Edgeble AI.

Also included are some dt-binding improvements with relevant Acks from
maintainers when the changes touch these areas.

* tag 'v6.3-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  dt-bindings: phy: rename phy-rockchip-inno-usb2.yaml
  dt-bindings: soc: rockchip: grf: add rockchip,rk3288-dp-phy.yaml
  dt-bindings: phy: rockchip: convert rockchip-dp-phy.txt to yaml
  ARM: dts: rockchip: Enable Ethernet on rv1126 Neu2-IO
  ARM: dts: rockchip: Add Ethernet GMAC node for RV1126
  ARM: dts: rockchip: Add ethernet rgmiim1 pin-control for rv1126
  dt-bindings: arm: rockchip: Add Edgeble Neural Compute Module 6
  ARM: dts: rockchip: add brcmf node to rk3066a-mk808
  ARM: dts: rockchip: add space between label and nodename nfc pinctrl on rk3128
  ARM: dts: rockchip: add rk3128-evb
  ARM: dts: rockchip: add rk3128 soc dtsi
  dt-bindings: arm: rockchip: Add Rockchip RK3128 Evaluation board
  ARM: dts: rockchip: Add Edgeble Neural Compute Module 2(Neu2) IO board
  ARM: dts: rockchip: Add Edgeble RV1126 Neural Compute Module 2(Neu2)
  dt-bindings: arm: rockchip: Add Edgeble Neural Compute Module 2
  dt-bindings: vendor-prefixes: Add Edgeble AI Technologies Pvt. Ltd.
  ARM: dts: rockchip: Add Rockchip RV1126 SoC
  ARM: dts: rockchip: Add Rockchip RV1126 pinctrl
  dt-bindings: arm: rockchip: Add pmu compatible for rv1126

Link: https://lore.kernel.org/r/5651506.31r3eYUQgx@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:11:08 +01:00
Arnd Bergmann 84afaf4e37 New SoC supported is the rk3588.
New boards rk3588-evb1, EmbedFire Lubancat 1+2 (based on different SoCs),
 a number of Radxa boards (rock-5a and -5b, compute module 3, cm3i e25),
 OrangePi R1 plus and the Edgeble Neu6 SoM and baseboard.
 
 A number of improvements for the Odroid Go (and its clones) including
 touchscreen and display support, led and audio changes.
 
 As well as some improvements for the rk356x, better gpu thermal values for
 px30 and some minor improvement for rock3a, rock5a, rk3566-demo,
 roc-rk3399-pc and bi-r2pro.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmPatMIQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgVOAB/4tGUPXZQ/M4UV3NBOP5x0Btpk93MbhPl3m
 i1jINiYawlh3hbVwrE5mnbtt/eZSUyMeAoBerv/aliUrk6EIGanl1MzDjXomv+BH
 0ljl0sxCjMpNcQ+/GSMzLI225ZqtK3dLClgioaq6/hL9rnK4gSDngbHWAqfEdWLk
 hbK52w90ovWcvcgStASUycPfj1RXjQnBbrt6K8BejhGhzln/B74dKy2k0v5QoG1F
 /y/JJMTpHPXi1Sd/1/dFYipkTTjKLs6tkPUl7exh3FBjuOWanBTzKDIF1sbEOPXZ
 sOW7T4sA672kmUtDcLuTtt7ENJzF/rWTiKvpl0LhjrsO1Jy7n1pn
 =egzW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPdB58ACgkQmmx57+YA
 GNmybA//dHOinmBxBDE4hO/1rm6/T6EOwaSIVKK6Vkla5tBIUXw9GgTYfrfj9/u9
 ZPdEqD8QXLSBR7LtV5X/qYrAQaCqplo5JFD5etx8yMUDtxnOLbqjfUul3+/2Q/PB
 BGJbhU8DcfTEsuvW02kiOg7a2WMm34PF0NsbSYxpdL2xPfkSNUaYZ9DTsh18b3sH
 rStIT91CnbzVkfQcsjx2QnwBaEahe/Mo7mZuPRU+10hhE6blcJyFsOdSZ/9znL80
 DHvCgiKI5o1tnatjsiJUVKxYOoErTfBzWWmJzBovJ5DDUenifEKXKGHDYdt4Wj9g
 WVif+Ymz1F9SjoEicHE4RXBN5UZPCGaGLHa3ENC+iEOlApaggduvpIjikp5AMfK/
 BLulkCrRU+06A0dNBTCps9HRwf8heYar5TV7EV6KmCscmkSHFssJXkBIwH0Pt+sm
 HKxQxvQ3O6IKg/Jutbw4P4VDk6GfX0TA7ERBveE/owY7pcbE+mK7531/IFOFdJPh
 bsnbTYAktoI+sX5Spfq0U88WQ0eo7qFnO+l/p51vV1T89wSiWeE6WYib6U5LkCgR
 ZMibp8BFH3fL7orxzQTaHAOsAHcuwrRrJVmIiziR8h71mvdkMfb23AGwlBeGTguh
 EAUa+zyjS3QutNjhi8dcf1JHJvP4qFRAW/X3u/qxJOH/W74WW9U=
 =oLg+
 -----END PGP SIGNATURE-----

Merge tag 'v6.3-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt

New SoC supported is the rk3588.

New boards rk3588-evb1, EmbedFire Lubancat 1+2 (based on different SoCs),
a number of Radxa boards (rock-5a and -5b, compute module 3, cm3i e25),
OrangePi R1 plus and the Edgeble Neu6 SoM and baseboard.

A number of improvements for the Odroid Go (and its clones) including
touchscreen and display support, led and audio changes.

As well as some improvements for the rk356x, better gpu thermal values for
px30 and some minor improvement for rock3a, rock5a, rk3566-demo,
roc-rk3399-pc and bi-r2pro.

* tag 'v6.3-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (46 commits)
  arm64: dts: rockchip: Correct the model name for Radxa E25
  arm64: dts: rockchip: Drop unneeded model for Radxa CM3i
  arm64: dts: rockchip: Add missing CM3i fallback compatible for Radxa E25
  arm64: dts: rockchip: Fix compatible for Radxa CM3
  arm64: dts: rockchip: rk3566: Enable WiFi, BT support for Radxa CM3
  arm64: dts: rockchip: Enable Ethernet for Radxa CM3 IO
  arm64: dts: rockchip: add display to RG503
  arm64: dts: rockchip: add pinctrls for 16-bit/18-bit rgb interface to rk356x
  arm64: dts: rockchip: Update eMMC, SD aliases for Radxa SBC boards
  arm64: dts: rockchip: Update eMMC, SD aliases for Radxa SoM boards
  arm64: dts: rockchip: Add Radxa Compute Module 3 IO board
  arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3
  dt-bindings: arm: rockchip: Add Radxa Compute Module 3
  arm64: dts: rockchip: Fix RX delay for ethernet phy on rk3588s-rock5a
  arm64: dts: rockchip: add Hynitron cst340 for Anbernic 353 series
  arm64: dts: rockchip: Enable wifi module AP6398s for rk3566 box demo
  arm64: dts: rockchip: rk3588: Add Edgeble Neu6 Model A IO
  arm64: dts: rockchip: rk3588: Add Edgeble Neu6 Model A SoM
  arm64: dts: rockchip: fix hdmi cec on rock-3a
  arm64: dts: rockchip: assign rate to clk_rtc_32k on rk356x
  ...

Link: https://lore.kernel.org/r/6491956.DvuYhMxLoT@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:09:51 +01:00
Arnd Bergmann 79668653e7 mt7986:
- add USB host support
 - add support for mmc, pcie
 - add support for Bananpi R3
 
 mt8173:
 - switch to SMC watchdog for Acer Chromebook R13
 - move panel under aux bus
 
 mt8183:
 - support detachable keyboards on kukui based Chromebooks
 - describe 13 MHz clock correctly
 - complete CPU cache information
 
 mt8186:
 - Add pm-domains, iommu, dsi
 - describe 13 MHz clock correctly
 - complete CPU cache information
 - add crypto support for the eMMC
 - add audio controler, DPI and ADSP mailbox support
 - describe CPUs as a single cluster
 
 mt8192:
 - describe 13 MHz clock correctly
 - complete CPU cache information
 - enable display regulators, backlight, internal display and audio on
   Acer Chromebook 514
 - describe CPUs as a single cluster
 
 mt8195:
 - Add power domain to t-phy
 - describe 13 MHz clock correctly
 - complete CPU cache information
 - enable audio for Acer Chromebook Spin 513
 - add ethernet support for the demo board
 - add JPG enconder and decoder device
 - describe CPUs as a single cluster
 
 Smaller changes for mt6795, mt7622, mt8516 and mt6358.
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmPap2UXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH70HxAAjyCpnvMxIXKenuK1Zy7ygGyS
 gZKtJiYcwZYnAOWCeE4X2DqBNEt4OZy0nS21a13CzvjxJ/c13S2TF5tfeSwWKfi6
 EtrOs3TUaEFp06SvwUbnHJ19wBtYqLrYSTPT3aM4MevPoYWHXF88qipQqkQN2NOu
 6UhpFQrV3Q+AL2BbPDqqbO0W61ZkjDJGserixJ5s7nyaPpLtRmA9FAtb95J1Hw6V
 iANSVMcqFETYyjs7wxQ2qqA03ZIclqccPpzpBMhPMzY1X6iU5C4W+t/5SbtChAQ+
 cQrGOcQm8ewrcOy2YprBtbPqINURANBLA6nJhR+qnS0bp6afXgG9y5iVxt1xLpUc
 nyvCAqy2Rpsr4jOM14dLabNr5k9bCwosufl7tcJ8P8QZqUb+NTUcfGz5RKnBgwCB
 C9shrM73TbjlKJXR9mWVCpORFmcO4wc73M588pgRtjV5AAozMYR9307gi/uDBylV
 FaTWDzGKr1ZdqhskCNAQ7dZTTSKcnNheklX/1KvZoNJ+pil1NTONGZ+4zzdfB/cZ
 j5WwrJ1Yno/YpCwq+4vb1+Ggur8RONPGXd8nFFO/GqPY3TGMoE3FP99jwhMhBxCm
 CyhRMq5wySs5PdYbRPLapQiqd1aeCOHDk+q/NEFeWwdia6Ms7ytzQ0zi4+i5jeqc
 55W7lPjF5WzHEBSr/C8=
 =UCgz
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPdBuMACgkQmmx57+YA
 GNlcxg//fTuPZ65yWE5HC1i09JpVCrQsXAi6vdFyLflrB7mf7L9tNT5524CHh910
 bdWVShdCztfuajWeGX+CD46xkzdwgRLgClCtA2tSPN2tG47Am7GeKew3LZLBBVgY
 mGCwUp0SAg6HFWUvvQ0jheT1f9Enc5Pgbhtc2TITNxwp2HiGym/U6bH/KTElsx1g
 TdA/HS/jSQLWH2f6u8z4cuu/XOufwF5PhtfUfX8NFBUvqQuIxf5Db70ZFNT0t0Bu
 1anXSxWmaJbXmJn+uz4L/Ya52XdeDbyIAusIFK9fA0RzOhZ/UoNavFAjEJhD4Gt2
 dcXvdWszhjIrnRcI1Alfx2BCzEl+1XTNrITIP85fG1HQUBsVFQmKM6xmtuzxDP3F
 u0svkPMF90m5sDRtnlRp27tBunKp12nf6hKO5sUkG9ysZrhK52ZzUISsNKtrIDyO
 SzZXnqYxJUnXNE4Xgdw2aVbJ8h1KwQPsa/D9aIqSyFQA2lH9XJT2s7jADMynHy5Z
 cG9vNiR/yOErinx07A3doBNHhqJv5Ghmaq/q26ogJUhWI1sRVVTYcI7w6UA6JUr+
 A8W1Bx83DNHViJlFy5nWi0c+D08oLv2LZvbNsJ8pOaMDoAEm7gKf+Sxv3yFVSc5G
 gEvtVo/6lEU16r2yzobiNs1NA1pFB9s2rWmmgXkofAwo4ofSxA0=
 =75+D
 -----END PGP SIGNATURE-----

Merge tag 'v6.2-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt

mt7986:
- add USB host support
- add support for mmc, pcie
- add support for Bananpi R3

mt8173:
- switch to SMC watchdog for Acer Chromebook R13
- move panel under aux bus

mt8183:
- support detachable keyboards on kukui based Chromebooks
- describe 13 MHz clock correctly
- complete CPU cache information

mt8186:
- Add pm-domains, iommu, dsi
- describe 13 MHz clock correctly
- complete CPU cache information
- add crypto support for the eMMC
- add audio controler, DPI and ADSP mailbox support
- describe CPUs as a single cluster

mt8192:
- describe 13 MHz clock correctly
- complete CPU cache information
- enable display regulators, backlight, internal display and audio on
  Acer Chromebook 514
- describe CPUs as a single cluster

mt8195:
- Add power domain to t-phy
- describe 13 MHz clock correctly
- complete CPU cache information
- enable audio for Acer Chromebook Spin 513
- add ethernet support for the demo board
- add JPG enconder and decoder device
- describe CPUs as a single cluster

Smaller changes for mt6795, mt7622, mt8516 and mt6358.

* tag 'v6.2-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (58 commits)
  arm64: dts: mediatek: mt8516: Fix the watchdog node name
  arm64: dts: mediatek: mt7986: Fix watchdog compatible
  arm64: dts: mediatek: mt8195: Fix watchdog compatible
  arm64: dts: mediatek: mt8186: Fix watchdog compatible
  arm64: dts: mt8173-elm: Switch to SMC watchdog
  arm64: dts: mediatek: mt7622: Add missing pwm-cells to pwm node
  arm64: dts: mt8192: Change idle states names to reflect actual function
  arm64: dts: mt8186: Change idle states names to reflect actual function
  arm64: dts: mt8195: Change idle states names to reflect actual function
  arm64: dts: mt8186: Fix CPU map for single-cluster SoC
  arm64: dts: mt8192: Fix CPU map for single-cluster SoC
  arm64: dts: mt8195: Fix CPU map for single-cluster SoC
  arm64: dts: mt8195: add jpeg decode device node
  arm64: dts: mt8195: add jpeg encode device node
  arm64: dts: mediatek: mt8183: drop double interrupts
  arm64: dts: mediatek: mt7622: drop serial clock-names
  arm64: dts: mt8195: Add efuse node to mt8195
  arm64: dts: mt8183: jacuzzi: Move panel under aux-bus
  arm64: dts: mediatek: mt8173-elm: Move display to ps8640 auxiliary bus
  arm64: dts: mt8195: Add Ethernet controller
  ...

Link: https://lore.kernel.org/r/2eefe6d4-6ca3-dc5f-6a04-f4f3c49692dd@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:06:43 +01:00
Arnd Bergmann 195631f73a Clean ups only:
- deleting unsused pins-are-numbered property
 - not existing second IRQ
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmPam9IXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH4a3xAAsE5gcFKPTPHNroPN4oghLJ5t
 A475q8hyyLHPPOhxah/Ol0cjtiVvIoJK3LtDKNK5U2ZtsjaL548NhESyIT2kFggg
 8/8fxUiSXrl3PrMunJBNA3FQ+zfB2BJUzIeRac7iysdyU5rr2omt7SOSC+fIfYnp
 A2/QjVJI3vhfHVDuezg0Zg+VsPkqeaneDwyKfCvCDIDWygAd0RJjRk6AlVZ/XHxb
 /Ayrr2yFV6Qb/HAklsXsulrhAzOV28Lj9yGmk5+ZOOTjMIZHsiJGwz5yXbCIEjSQ
 i/OP+kziTcF3XZahTbzlbpKeMC2V+rt+ulQ1U0buUiScV2wBZ8YVpzlFKnOEOYjJ
 JTprx9D3TWmKpjki32hStEyxikzDz7WI4EDdxHGs/xL5xDEZJf6foOeZOK9tYCV/
 7nZceT4oz7ueXC3LlgqHFrJk/V6EtoRyWKY7ytFO5kc7JVX5bwhymJV4KdxT8xCn
 Vx5iSTwZH+3JHi9oIuon99rdAJZPM3ROR4SwVwsWQPdZ7a+CCgVo1MMVKfx3oCN7
 P1nN46ueM+uDPPoTp0BSvQybMZJGzz4JhnDpiLo7BYDIG8t0fXyOfM6FdEAxp8bC
 HrYIuQxHwt1AHUQXBHfB88N5wDYJxJL4fNNEtIokbbzhxQOyazKDze2oySxERyV6
 7bQBwk5HcXOfE8eXGyM=
 =HeDx
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPdBrAACgkQmmx57+YA
 GNmTAg//aHWcblnJV62YoiQNwGuoS8vL2yQF5CRacQ69EaXd8sAtv9lD4UIAS+z6
 ptyrXIMPO1/Ewlv+fgGCWNGAraYjtloCIjD/36GFR1rN/7WpiYwz4OmIu13gnhg2
 PaVRx8nUa7TJCpn07783vK7CXmExrf6QGsGdEL+UffJnw/5+ogcEBVNHBMUr11eG
 c+0d1ewrnIo0YOKi/0Cd9nliALKsU45o7g1tLzl884bqLx+Nb99r0psqSYWP5bKJ
 6/lQPxGu8A0DN7t9/WoCiiA/w7gO21JZbgX+dTy76AqG1sZA4t2hrnGL2zVnF2UJ
 GVIlfN7PeCRPXmiATU6DUq/XprXGbrkXbB64vQHFGD6NVuc8h4lixtE89h8f7Iv/
 KyZBknDgy4OjQ8/GgT8tbZ/Z42GNDhS+H4ye5dCfNyqAhuBZclJXZ8qqbLZIJcDy
 vYbf5s4sQStIyTlbuRxlyuanzpnSn7e069DkwNEMTKQrHDAJ2ENDqJHesUeytK5k
 cxfPx6LfCcUbK3q7GXnejMODK2KJpj875p0b0xq+IQDv5zznEHiXYbiMCLDN/hVk
 g5ZtpDZ1yRprm6oo4Slo6nKbIwslj6EcYFlq5oV15QUoGpcBfuNb/49b7qQvWdA2
 mueibrTlxzFbIwvaHllwVoyQCUNoNNTd7evnrRYHvaEhIwIcFIc=
 =uLw/
 -----END PGP SIGNATURE-----

Merge tag 'v6.2-next-dts32' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt

Clean ups only:
- deleting unsused pins-are-numbered property
- not existing second IRQ

* tag 'v6.2-next-dts32' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  ARM: dts: mediatek: Remove pins-are-numbered property
  arm: dts: mt7629: Remove extra interrupt from timer node

Link: https://lore.kernel.org/r/17aee808-1f3f-fe75-68d4-adb71915e5cb@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 14:05:52 +01:00
Sascha Hauer 7f49b03739 drivers/perf: fsl_imx8_ddr_perf: Remove set-but-not-used variable
active_events is set but not used, remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20230203121509.3580245-1-s.hauer@pengutronix.de
Signed-off-by: Will Deacon <will@kernel.org>
2023-02-03 13:04:22 +00:00
Minghao Chi 301cfbc124 power: supply: max1721x: Use strscpy() is more robust and safer
The implementation of strscpy() is more robust and safer.

That's now the recommended way to copy NUL terminated strings.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 13:58:41 +01:00
Xu Panda 3639dbd74e power: supply: test-power: use strscpy() instead of strncpy()
The implementation of strscpy() is more robust and safer.
That's now the recommended way to copy NUL-terminated strings.

Signed-off-by: Xu Panda <xu.panda@zte.com.cn>
Signed-off-by: Yang Yang <yang.yang29@zte.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 13:43:48 +01:00
Sicelo A. Mhlongo e2b018cb55 power: supply: bq27xxx: fix reporting critical level
The EDV1/SOC1 flag is set when the battery voltage drops below the
threshold set in EEPROM. From observing the capacity_level reported by
the driver, and reading the datasheet, EDV1 remains set even when
EDVF/SOCF gets set. Thus, bq27xxx_battery_capacity_level() never reaches
the CAPACITY_LEVEL_CRITICAL code path, since CAPACITY_LEVEL_LOW takes
precedence.

This commit fixes the issue by swapping the order in which the flags are
tested. It was tested with bq27200 in the Nokia N900.

Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 13:35:04 +01:00
Hermes Zhang 4651b6b729 power: supply: bq256xx: Init ichg/vbat value with chip default value
Init the ichg/vbat reg with chip default value instead of the max value
used now. The max value set in driver will result an unsafe case (e.g.
battery is over charging when in a hot environment) if no user space
update the value later.

Signed-off-by: Hermes Zhang <chenhuiz@axis.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 13:32:01 +01:00
Andy Shevchenko fccd2b763c power: supply: collie_battery: Convert to GPIO descriptors (part 2)
Finish the job started by the commit ba940ed832 ("power: supply:
collie_battery: Convert to GPIO descriptors"), i.e. convert the use
of gpio_to_irq() to gpiod_to_irq(). No functional changes intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 13:28:59 +01:00
Andreas Kemnade c85c191694 power: supply: remove faulty cooling logic
The rn5t618 power driver fails to register
a cooling device because POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX
is missing but availability is not checked before registering
cooling device. After improved error checking in the thermal
code, the registration of the power supply fails entirely.

Checking for availability of _MAX before registering cooling device
fixes the rn5t618 problem. But the whole logic feels questionable.

First, the logic is inverted here:
the code tells: max_current = max_cooling but
0 = max_cooling, so there needs to be some inversion
in the code which cannot be found. Comparing with other
cooling devices, it can be found that value for fan speed is not
inverted, value for cpufreq cooling is inverted (similar situation
as here lowest frequency = max cooling)

Second, analyzing usage of _MAX: it is seems that maximum capabilities
of charging controller are specified and not of the battery. Probably
there is not too much mismatch in the drivers actually implementing
that. So nothing has exploded yet.  So there is no easy and safe way
to specifify a max cooling value now.

Conclusion for now (as a regression fix) just remove the cooling device
registration and do it properly later on.

Fixes: e49a1e1ee0 ("thermal/core: fix error code in __thermal_cooling_device_register()")
Fixes: 952aeeb3ee ("power_supply: Register power supply for thermal cooling device")
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 13:26:00 +01:00
Patrick Delaunay f46bbb7f9e
ARM: configs: multi_v7: enable NVMEM driver for STM32
Enable the STMicroelectronics NVMEM drivers used on
STM32 MPU, STM32MP15x and STM32MP13x, to access OTPs.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Link: https://lore.kernel.org/r/20230202130040.25233-1-alexandre.torgue@foss.st.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-03 13:17:57 +01:00
Pali Rohár e6333293f2 power: reset: syscon-reboot: Add support for specifying priority
Read new optional device tree property priority for specifying priority
level of reset handler. Default value is 192 as before.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 13:10:56 +01:00
Pali Rohár d7544cbe04 dt-bindings: reset: syscon-reboot: Add priority property
This new optional priority property allows to specify custom priority level
of reset device. Prior this change priority level was hardcoded to 192 and
not possible to specify or change. Specifying other value is needed for
some boards. Default level when not specified stays at 192 as before.

Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[add $ref to existing allOf to fix duplication warning]
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-02-03 13:10:34 +01:00
Vijendar Mukunda 96ebccb235
ASoC: amd: update ps platform acp header file
Rename Audio buffer and soundwire manager instance registers.
Remove scratch registers as these registers can be accessed
using ACP_SCRATCH_REG_0 register relative offset.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230201165626.3169041-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:04:02 +00:00
Yang Li 1c9ded98bd
ASoC: codecs: fix platform_no_drv_owner.cocci warning
./sound/soc/codecs/aw88395/aw88395.c:572:3-8: No need to set .owner here. The core will do it.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3935
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230203011504.78918-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:04:01 +00:00
Jerome Brunet 480b262268
ASoC: dt-bindings: meson: fix gx-card codec node regex
'codec' is a valid node name when there is a single codec
in the link. Fix the node regular expression to apply this.

Fixes: fd00366b8e ("ASoC: meson: gx: add sound card dt-binding documentation")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230202183653.486216-3-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:04:00 +00:00
Jerome Brunet e398bbb983
ASoC: dt-bindings: create component common schema
All DAIs are component but not all components are DAI.
Move the component properties (sound-name-prefix ATM) to a separate schema
file so it can be used by non-DAI components, such as auxiliary devices.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230202183653.486216-2-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:59 +00:00
Arnd Bergmann c5a61db9bf
ASoC: SOF: fix intel-soundwire link failure
My randconfig build setup ran into a rare build failure with

CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=y
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m
CONFIG_SOUNDWIRE=y
CONFIG_SOUNDWIRE_INTEL=m
CONFIG_SND_SOC_SOF_HDA=y
CONFIG_SND_SOC_SOF_INTEL_TGL=y

x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_init_caps':
hda.c:(.text+0x691): undefined reference to `sdw_intel_cnl_hw_ops'
x86_64-linux-ld: hda.c:(.text+0x6f2): undefined reference to `sdw_intel_probe'
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_startup':
hda.c:(.text+0x1c40): undefined reference to `sdw_intel_startup'
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_process_wakeen':
hda.c:(.text+0x1cb6): undefined reference to `sdw_intel_process_wakeen_event'
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_interrupt_thread':
hda.c:(.text+0x1d67): undefined reference to `sdw_intel_thread'
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_remove':
hda.c:(.text+0x2655): undefined reference to `sdw_intel_exit'

My best understanding is that the definition of
SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE was intended to avoid this
problem, but got it wrong for the SND_SOC_SOF_INTEL_SOUNDWIRE=m case,
where the 'select' is meant to set SOUNDWIRE_INTEL to the value of
SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE rather than the intersection of
SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE and SND_SOC_SOF_INTEL_SOUNDWIRE.

Change the condition to check for SND_SOC_SOF_INTEL_SOUNDWIRE to be a
boolean rather than a tristate expression in order to propagate this
as intended.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230202102247.806749-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:58 +00:00
Trevor Wu 66b9e94cb7
ASoC: mediatek: mt8188: remove etdm dead code
Some Smatch static checker warning like below was found.

sound/soc/mediatek/mt8188/mt8188-dai-etdm.c:2487
mt8188_dai_etdm_parse_of()
warn: 'ret' returned from snprintf() might be larger than 48

    2479         for (i = 0; i < MT8188_AFE_IO_ETDM_NUM; i++) {
    2480                 dai_id = ETDM_TO_DAI_ID(i);
    2481                 etdm_data = afe_priv->dai_priv[dai_id];
    2482
    2483                 ret = snprintf(prop, sizeof(prop),
    2484                                "mediatek,%s-multi-pin-mode",
    2485                                of_afe_etdms[i].name);
    2486                 if (ret < 0) {
--> 2487                         dev_err(afe->dev, "%s snprintf
err=%d\n",
    2488

In linux kernel, snprintf() never returns negatives. On the other hand,
the format string like "mediatek,%s-multi-pin-mode" must be smaller
than sizeof(prop)=48.

After discussing in the mail thread[1], I remove the dead code to fix
the Smatch warnings.

[1]: https://lore.kernel.org/all/Y9EdBg641tJDDrt%2F@kili/

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20230202103704.15626-1-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:57 +00:00
Rander Wang 3937a76c64
ASoC: SOF: ipc4-pcm: add delay function support
The delay function is used to calculate the difference
between hw_ptr and dai dma position. I2S, DMIC and SDW will
use dai dma position in shared SRAM window to calculate the
delay. HDaudio will retrieve dai dma position from host mmio memory
space since it doesn't support LLP counter reported by firmware.

In two cases dai dma position is inaccurate for delay calculation
(1) dai pipeline is started before host pipeline
(2) multiple streams mixed into one. Each stream has the same dai
    dma position
Firmware calculates correct stream_start_offset for all cases including
above two. Driver subtracts stream_start_offset from dai dma position to
get accurate one.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:55 +00:00
Rander Wang faceb3445a
ASoC: SOF: Intel: mtl: add get_stream_position support
Get HDaudio link position for current stream delay calculation
from hda registers.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:54 +00:00
Rander Wang 7f95629727
ASoC: SOF: add get_stream_position ops for pcm delay
PCM delay depends on stream position based on hardware
counter to calculate stream delay so add this ops to get
stream position according to hardware counter.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:53 +00:00
Rander Wang 27c2100b6b
ASoC: SOF: add delay function support in sof framework
Sof framework will call specific delay function for
different IPC version.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:52 +00:00
Rander Wang 7cb19007ba
ASoC: SOF: ipc4-pcm: add hw_params
Use the hw_params to init time info for ipc4 delay calculation.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:51 +00:00
Rander Wang af74dbd0db
ASoC: SOF: ipc4-pcm: allocate time info for pcm delay feature
Allocate time info when pcm is loaded by topology
and free it when pcm is unloaded by topology.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:50 +00:00
Rander Wang 65a8ef494a
ASoC: SOF: add time info structure for ipc4 path
Start_stream_offset is used to strip invalid sample count in dai
for some cases like dai is started before host. llp_offset is used
to get current dai position from memory windows.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:49 +00:00
Rander Wang 4700bfb2bb
ASoC: SOF: add fw_info_box support
FW can share some information with host driver, .e.g fw status, pipeline
status and volume status. On ipc4 platform it is located in memory
windows 0 with size of struct sof_ipc4_fw_reg.

With this patch, ipc4 driver can find fw information in fw_info_box

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:48 +00:00
Rander Wang 2740dcce91
ASoC: SOF: add ipc4_fw_reg header file
Ipc4_fw_reg defines the content of memory window 0 shared by fw.
Host driver can get fw information by data structure defined in
this file.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-03 12:03:48 +00:00
Song Liu 0c05e7bd2d livepatch,x86: Clear relocation targets on a module removal
Josh reported a bug:

  When the object to be patched is a module, and that module is
  rmmod'ed and reloaded, it fails to load with:

  module: x86/modules: Skipping invalid relocation target, existing value is nonzero for type 2, loc 00000000ba0302e9, val ffffffffa03e293c
  livepatch: failed to initialize patch 'livepatch_nfsd' for module 'nfsd' (-8)
  livepatch: patch 'livepatch_nfsd' failed for module 'nfsd', refusing to load module 'nfsd'

  The livepatch module has a relocation which references a symbol
  in the _previous_ loading of nfsd. When apply_relocate_add()
  tries to replace the old relocation with a new one, it sees that
  the previous one is nonzero and it errors out.

He also proposed three different solutions. We could remove the error
check in apply_relocate_add() introduced by commit eda9cec4c9
("x86/module: Detect and skip invalid relocations"). However the check
is useful for detecting corrupted modules.

We could also deny the patched modules to be removed. If it proved to be
a major drawback for users, we could still implement a different
approach. The solution would also complicate the existing code a lot.

We thus decided to reverse the relocation patching (clear all relocation
targets on x86_64). The solution is not
universal and is too much arch-specific, but it may prove to be simpler
in the end.

Reported-by: Josh Poimboeuf <jpoimboe@redhat.com>
Originally-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Song Liu <song@kernel.org>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Reviewed-by: Joe Lawrence <joe.lawrence@redhat.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20230125185401.279042-2-song@kernel.org
2023-02-03 11:28:22 +01:00
Song Liu bbb93362a4 x86/module: remove unused code in __apply_relocate_add
This "#if 0" block has been untouched for many years. Remove it to clean
up the code.

Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Song Liu <song@kernel.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Reviewed-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20230125185401.279042-1-song@kernel.org
2023-02-03 11:27:23 +01:00
Eric Curtin 9e6a1825ac iommu: dart: DART_T8110_ERROR range should be 0 to 5
This was detected by smatch as one "else if" statement could never be
reached. Confirmed bit order by comparing with python implementation [1].

drivers/iommu/apple-dart.c:991 apple_dart_t8110_irq()
warn: duplicate check 'error_code == ((((1))) << (3))'
  (previous on line 989)

Link: https://github.com/AsahiLinux/m1n1/commit/96b2d584feec1e3f7bfa [1]

Fixes: d8bcc870d9 ("iommu: dart: Add t8110 DART support")
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Link: https://lore.kernel.org/r/20230201124257.7801-1-ecurtin@redhat.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-02-03 11:10:40 +01:00
Kan Liang d8a7c0cf05 iommu/vt-d: Enable IOMMU perfmon support
Register and enable an IOMMU perfmon for each active IOMMU device.

The failure of IOMMU perfmon registration doesn't impact other
functionalities of an IOMMU device.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20230128200428.1459118-8-kan.liang@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-02-03 11:06:09 +01:00
Kan Liang 4a0d426565 iommu/vt-d: Add IOMMU perfmon overflow handler support
While enabled to count events and an event occurrence causes the counter
value to increment and roll over to or past zero, this is termed a
counter overflow. The overflow can trigger an interrupt. The IOMMU
perfmon needs to handle the case properly.

New HW IRQs are allocated for each IOMMU device for perfmon. The IRQ IDs
are after the SVM range.

In the overflow handler, the counter is not frozen. It's very unlikely
that the same counter overflows again during the period. But it's
possible that other counters overflow at the same time. Read the
overflow register at the end of the handler and check whether there are
more.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20230128200428.1459118-7-kan.liang@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-02-03 11:06:08 +01:00
Kan Liang 46284c6ceb iommu/vt-d: Support cpumask for IOMMU perfmon
The perf subsystem assumes that all counters are by default per-CPU. So
the user space tool reads a counter from each CPU. However, the IOMMU
counters are system-wide and can be read from any CPU. Here we use a CPU
mask to restrict counting to one CPU to handle the issue. (with CPU
hotplug notifier to choose a different CPU if the chosen one is taken
off-line).

The CPU is exposed to /sys/bus/event_source/devices/dmar*/cpumask for
the user space perf tool.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20230128200428.1459118-6-kan.liang@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-02-03 11:06:08 +01:00
Kan Liang 7232ab8b89 iommu/vt-d: Add IOMMU perfmon support
Implement the IOMMU performance monitor capability, which supports the
collection of information about key events occurring during operation of
the remapping hardware, to aid performance tuning and debug.

The IOMMU perfmon support is implemented as part of the IOMMU driver and
interfaces with the Linux perf subsystem.

The IOMMU PMU has the following unique features compared with the other
PMUs.
- Support counting. Not support sampling.
- Does not support per-thread counting. The scope is system-wide.
- Support per-counter capability register. The event constraints can be
  enumerated.
- The available event and event group can also be enumerated.
- Extra Enhanced Commands are introduced to control the counters.

Add a new variable, struct iommu_pmu *pmu, to in the struct intel_iommu
to track the PMU related information.

Add iommu_pmu_register() and iommu_pmu_unregister() to register and
unregister a IOMMU PMU. The register function setup the IOMMU PMU ops
and invoke the standard perf_pmu_register() interface to register a PMU
in the perf subsystem. This patch only exposes the functions. The
following patch will enable them in the IOMMU driver.

The IOMMU PMUs can be found under /sys/bus/event_source/devices/dmar*

The available filters and event format can be found at the format folder

 $ ls /sys/bus/event_source/devices/dmar1/format/
 event  event_group  filter_ats  filter_ats_en  filter_page_table
 filter_page_table_en

The supported events can be found at the events folder

 $ ls /sys/bus/event_source/devices/dmar1/events/
 ats_blocked        fs_nonleaf_hit           int_cache_hit_posted
 iommu_mem_blocked  iotlb_hit        pasid_cache_lookup  ss_nonleaf_hit
 ctxt_cache_hit     fs_nonleaf_lookup        int_cache_lookup
 iommu_mrds         iotlb_lookup     pg_req_posted    ss_nonleaf_lookup
 ctxt_cache_lookup  int_cache_hit_nonposted  iommu_clocks
 iommu_requests     pasid_cache_hit  pw_occupancy

The command below illustrates filter usage with a simple example.

 $ perf stat -e dmar1/iommu_requests,filter_ats_en=0x1,filter_ats=0x1/
   -a sleep 1

 Performance counter stats for 'system wide':

   368,947      dmar1/iommu_requests,filter_ats_en=0x1,filter_ats=0x1/

 1.002592074 seconds time elapsed

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20230128200428.1459118-5-kan.liang@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-02-03 11:06:06 +01:00
Kan Liang dc57875866 iommu/vt-d: Support Enhanced Command Interface
The Enhanced Command Register is to submit command and operand of
enhanced commands to DMA Remapping hardware. It can supports up to 256
enhanced commands.

There is a HW register to indicate the availability of all 256 enhanced
commands. Each bit stands for each command. But there isn't an existing
interface to read/write all 256 bits. Introduce the u64 ecmdcap[4] to
store the existence of each enhanced command. Read 4 times to get all of
them in map_iommu().

Add a helper to facilitate an enhanced command launch. Make sure hardware
complete the command. Also add a helper to facilitate the check of PMU
essentials. These helpers will be used later.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20230128200428.1459118-4-kan.liang@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-02-03 11:06:05 +01:00