]> git.dujemihanovic.xyz Git - u-boot.git/commit
board: amlogic: odroid: add runtime detection of the N2/N2+/C4/HC4 variants
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 4 Feb 2021 09:11:45 +0000 (10:11 +0100)
committerNeil Armstrong <narmstrong@baylibre.com>
Wed, 10 Feb 2021 09:00:51 +0000 (10:00 +0100)
commit8bc780106c1399bd263c4283a8747889a613ca5d
tree05440dc6f2ede4f716735962d2ed62507c402324
parent4547551aa019698524e809f81f65d5782f62bc1d
board: amlogic: odroid: add runtime detection of the N2/N2+/C4/HC4 variants

Use the ADC channel 1 to check the hardware revision of the board and
detect the N2 vs. N2+ and the C4 vs. HC4 variants. Each of them use
different dtb file, so adjust fdtfile environment variable to the
detected variant.

The ADC min/max values for each variant are taken from the vendor code,
adjusted to the 12-bit ADC driver operation mode (vendor code use 10-bit
mode).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
arch/arm/dts/meson-g12b-odroid-n2-u-boot.dtsi
arch/arm/dts/meson-sm1-odroid-c4-u-boot.dtsi
board/amlogic/odroid-n2/odroid-n2.c
configs/odroid-c4_defconfig
configs/odroid-n2_defconfig