Skip to content

Commit ab563bf

Browse files
Eugeniy Paltsevvineetgarc
authored andcommitted
ARC: [plat-hsdk]: Enable on-boardi SPI ADC IC
HSDK board has adc108s102 SPI ADC IC installed, enable it. Acked-by: Alexey Brodkin <[email protected]> Signed-off-by: Eugeniy Paltsev <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent 8ca8fa7 commit ab563bf

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

arch/arc/boot/dts/hsdk.dts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@
6565
clock-frequency = <33333333>;
6666
};
6767

68+
reg_5v0: regulator-5v0 {
69+
compatible = "regulator-fixed";
70+
71+
regulator-name = "5v0-supply";
72+
regulator-min-microvolt = <5000000>;
73+
regulator-max-microvolt = <5000000>;
74+
};
75+
6876
cpu_intc: cpu-interrupt-controller {
6977
compatible = "snps,archs-intc";
7078
interrupt-controller;
@@ -272,6 +280,13 @@
272280
#size-cells = <1>;
273281
spi-max-frequency = <4000000>;
274282
};
283+
284+
adc@1 {
285+
compatible = "ti,adc108s102";
286+
reg = <1>;
287+
vref-supply = <&reg_5v0>;
288+
spi-max-frequency = <1000000>;
289+
};
275290
};
276291

277292
creg_gpio: gpio@14b0 {

arch/arc/configs/hsdk_defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ CONFIG_GPIO_SYSFS=y
5757
CONFIG_GPIO_DWAPB=y
5858
CONFIG_GPIO_SNPS_CREG=y
5959
# CONFIG_HWMON is not set
60+
CONFIG_REGULATOR=y
61+
CONFIG_REGULATOR_FIXED_VOLTAGE=y
6062
CONFIG_DRM=y
6163
# CONFIG_DRM_FBDEV_EMULATION is not set
6264
CONFIG_DRM_UDL=y
@@ -74,6 +76,8 @@ CONFIG_MMC_SDHCI_PLTFM=y
7476
CONFIG_MMC_DW=y
7577
CONFIG_DMADEVICES=y
7678
CONFIG_DW_AXI_DMAC=y
79+
CONFIG_IIO=y
80+
CONFIG_TI_ADC108S102=y
7781
CONFIG_EXT3_FS=y
7882
CONFIG_VFAT_FS=y
7983
CONFIG_TMPFS=y

0 commit comments

Comments
 (0)