]> git.baikalelectronics.ru Git - uboot.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)
commitad1bdeb2d191d10537e6df5ab00bf19ade38a831
tree05440dc6f2ede4f716735962d2ed62507c402324
parentac1968e8e5c26c4c210ed91ab0d76fa8e7c36bea
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