summaryrefslogtreecommitdiffstats
path: root/drivers/soc/amlogic/meson-gx-socinfo.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* soc: amlogic: meson-gx-socinfo: add new A113X SoC idViacheslav Bocharov2024-06-061-0/+1
| | | | | | | | | | | Add new definition for Amlogix A113X SoC found in JetHub D1/D1+ devices: soc soc0: Amlogic Meson AXG (A113X) Revision 25:b (43:2) Detected Signed-off-by: Viacheslav Bocharov <adeep@lexina.in> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20240604140612.1179323-1-adeep@lexina.in Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
* soc: amlogic: meson-gx-socinfo: Add S905L IDChristian Hewitt2024-06-061-0/+1
| | | | | | | | | | | Add the S905L SoC ID observed in several P271 boards: kernel: soc soc0: Amlogic Meson GXLX (S905L) Revision 26:a (c1:2) Detected Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20240604050752.3312468-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
* soc: amlogic: meson-gx-socinfo: use new soc_device_register functionality to ↵Heiner Kallweit2023-03-291-5/+0
| | | | | | | | | | | | | populate machine name A new fallback mechanism has been added to soc_device_register that populates machine with the DT model information if machine isn't set yet. This allows to remove this code here. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/ac3b4356-d4c3-25e4-9bc2-c5b369c676b2@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* soc: amlogic: meson-gx-socinfo: Add S905Y2 ID for Radxa ZeroChristian Hewitt2021-09-131-0/+1
| | | | | | | | | | | | Add the SOC ID for the S905Y2 used in the Radxa Zero. Before/After: [ 0.321650] soc soc0: Amlogic Meson G12A (Unknown) Revision 28:b (30:2) Detected [ 0.318533] soc soc0: Amlogic Meson G12A (S905Y2) Revision 28:b (30:2) Detected Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20210820012718.10761-1-christianshewitt@gmail.com
* soc: amlogic: meson-gx-socinfo: Fix S905X3 and S905D3 ID'sChristian Hewitt2020-06-301-3/+5
| | | | | | | | | | | | | | | | | | | Correct the SoC revision and package bits/mask values for S905D3/X3 to detect a wider range of observed SoC IDs, and tweak sort order for A311D/S922X. S905X3 05 0000 0101 (SEI610 initial devices) S905X3 10 0001 0000 (ODROID-C4 and recent Android boxes) S905X3 50 0101 0000 (SEI610 later revisions) S905D3 04 0000 0100 (VIM3L devices in kernelci) S905D3 b0 1011 0000 (VIM3L initial production) Fixes commit c9cc9bec36d0 ("soc: amlogic: meson-gx-socinfo: Add SM1 and S905X3 IDs") Suggested-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20200609081318.28023-1-christianshewitt@gmail.com
* soc: amlogic: meson-gx-socinfo: Fix S905D3 ID for VIM3LChristian Hewitt2019-11-061-1/+1
| | | | | | | | | | | | | | Chip on the board is S905D3 not S905X3: [ 0.098998] soc soc0: Amlogic Meson SM1 (S905D3) Revision 2b:c (b0:2) Detected Change from v1: use 0xf0 mask instead of 0xf2 as advised by Neil Armstrong. Fixes: 1d7c541b8a5b ("soc: amlogic: meson-gx-socinfo: Add S905X3 ID for VIM3L") Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* soc: amlogic: meson-gx-socinfo: Add S905X3 ID for VIM3LChristian Hewitt2019-10-071-0/+1
| | | | | | | | | VIM3L appears to use a different ID: [ 0.086470] soc soc0: Amlogic Meson SM1 (S905X3) Revision 2b:c (b0:2) Detected Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* soc: amlogic: meson-gx-socinfo: Add A1 and A113L IDsJianxin Pan2019-10-071-0/+2
| | | | | | | | | | Add the SoC IDs for the A113L Amlogic A1 SoC. Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* soc: amlogic: meson-gx-socinfo: Add of_node_put() before returnNishka Dasgupta2019-08-201-1/+3
| | | | | | | | | | | | | The variable np in function meson_gx_socinfo_init takes the return value of of_find_compatible_node, which gets a node but does not put it. If this node is not put it may cause a memory leak. Hence put np after its usefulness has been exhausted. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Fixes: a9daaba2965e ("soc: Add Amlogic SoC Information driver") Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* soc: amlogic: meson-gx-socinfo: Add SM1 and S905X3 IDsNeil Armstrong2019-08-201-0/+2
| | | | | | | | | Add the SoC IDs for the S905X3 Amlogic SM1 SoC. Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* soc: amlogic: meson-gx-socinfo: add A311D idChristian Hewitt2019-08-051-0/+1
| | | | | | | | | Add the SoC ID for the A311D Amlogic SoC. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* meson-gx-socinfo: add missing of_node_put after of_device_is_availableJulia Lawall2019-03-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an of_node_put when a tested device node is not available. The semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ identifier f; local idexpression e; expression x; @@ e = f(...); ... when != of_node_put(e) when != x = e when != e = x when any if (<+...of_device_is_available(e)...+>) { ... when != of_node_put(e) ( return e; | + of_node_put(e); return ...; ) } // </smpl> Fixes: a9daaba2965e8 ("soc: Add Amlogic SoC Information driver") Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* soc: amlogic: gx-socinfo: Add new SoC IDs and Packages IDsNeil Armstrong2019-03-181-0/+7
| | | | | | | | | | | This adds the: - G12A SoC ID and S905X2, S905D2 package IDs, found booting the X96 Max and U200 Reference Board - G12B SoC ID and S922X package ID, found booting the Odroid-N2 - S805X, S805Y package IDs found in the vendor U-Boot source Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* soc: amlogic: gx-socinfo: Add mask for each SoC packagesNeil Armstrong2019-03-181-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | When updated IDs on f842c41adc04 ("amlogic: meson-gx-socinfo: Update soc ids") we introduced packages ids using the full 8bit value, but in the function socinfo_to_package_id() the id was filtered with the 0xf0 mask. While the 0xf0 mask is valid for most board, it filters out the lower 4 bits which encodes some characteristics of the chip. This patch moves the mask into the meson_gx_package_id table to be applied on each package name independently and add the correct mask for some specific entries. An example is the S905, in the vendor code the S905 is package_id different from 0x20, and S905M is exactly 0x20. Another example are the The Wetek Hub & Play2 boards using a S905-H variant, which is the S905 SoC with some licence bits enabled. These licence bits are encoded in the lower 4bits, so to detect the -H variant, we must detect the id == 0x3 with the 0xf mask. Fixes: f842c41adc04 ("amlogic: meson-gx-socinfo: Update soc ids") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* amlogic: meson-gx-socinfo: Update soc idsNeil Armstrong2018-03-201-0/+10
| | | | | | | | Updates the Amlogic Meson SoCs IDs for the Armv8 based SoCs. It includes the new families and packages. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* meson-gx-socinfo: make local function meson_gx_socinfo_init staticweiyongjun (A)2018-02-121-1/+1
| | | | | | | | | | | Fixes the following sparse warnings: drivers/soc/amlogic/meson-gx-socinfo.c:100:12: warning: symbol 'meson_gx_socinfo_init' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* meson-gx-socinfo: Fix package id parsingArnaud Patard2017-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | I've noticed the following message while booting a S905X based board: soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected The S905D string is obviously wrong. The vendor code does: ... ver = (readl(assist_hw_rev) >> 8) & 0xff; meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver; ver = (readl(assist_hw_rev) >> 16) & 0xff; meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver; ... while the current code does: ... ... This means that the current mainline code has package id and minor version reversed. Fixes: a9daaba2965e8 ("soc: Add Amlogic SoC Information driver") Signed-off-by: Arnaud Patard <apatard@hupstream.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
* soc: Add Amlogic SoC Information driverNeil Armstrong2017-07-281-0/+177
Amlogic SoCs have a SoC information register for SoC type, package type and revision information. This patchs adds support for this register decoding and exposing with the SoC bus infrastructure. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>