mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-26 11:58:52 +09:00
![Marek Szyprowski](/assets/img/avatar_default.png)
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>
24 lines
511 B
Plaintext
24 lines
511 B
Plaintext
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
/*
|
|
* Copyright (c) 2020 BayLibre, SAS
|
|
* Author: Neil Armstrong <narmstrong@baylibre.com>
|
|
*/
|
|
|
|
#include "meson-sm1-u-boot.dtsi"
|
|
|
|
ðmac {
|
|
snps,reset-gpio = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
|
|
snps,reset-delays-us = <0 10000 1000000>;
|
|
snps,reset-active-low;
|
|
};
|
|
|
|
/* SARADC is needed for proper board variant detection */
|
|
&saradc {
|
|
status = "okay";
|
|
vref-supply = <&vddao_1v8>;
|
|
};
|
|
|
|
&tflash_vdd {
|
|
gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>;
|
|
};
|