Commit 4f720146 authored by TOKITA Hiroshi's avatar TOKITA Hiroshi Committed by Carles Cufi
Browse files

dts: bindings: adc: Add RaspberryPi Pico ADC



Define RaspberryPi Pico ADC.

The ADC has internally connected temperature sensor,
Add property to enable this.

The ADC has a single VREF. VCC usually connects to it,
but it may not be in a case.
Add property to make configurable it.

Signed-off-by: default avatarTOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
parent 725aa475
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -119,6 +119,16 @@
			status = "disabled";
		};

		adc: adc@4004c000 {
			compatible = "raspberrypi,pico-adc";
			reg = <0x4004c000 DT_SIZE_K(4)>;
			resets = <&reset RPI_PICO_RESETS_RESET_ADC>;
			interrupts = <22 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
			interrupt-names = "adc0";
			status = "disabled";
			#io-channel-cells = <1>;
		};

		i2c0: i2c@40044000 {
			compatible = "snps,designware-i2c";
			#address-cells = <1>;
+28 −0
Original line number Diff line number Diff line
# Copyright (c) 2022 TOKTIA Hrioshi <tokita.hiroshi@fujitsu.com>
# SPDX-License-Identifier: Apache-2.0

description: RaspberryPi Pico ADC

compatible: "raspberrypi,pico-adc"

include: [adc-controller.yaml, pinctrl-device.yaml, reset-device.yaml]

properties:
    reg:
      required: true

    vref-mv:
      type: int
      required: false
      default: 3300
      description: |
        Indicate the reference voltage of the ADC in mV.
        Raspberry Pi has one voltage reference.
        And it is usually connected to VDD.
        In such case, set this property to the VDD (in mV) value.

    "#io-channel-cells":
      const: 1

io-channel-cells:
    - input
+5 −0
Original line number Diff line number Diff line
@@ -152,4 +152,9 @@
#define SPI1_RX_P28 RP2040_PINMUX(28, RP2_PINCTRL_GPIO_FUNC_SPI)
#define SPI1_CSN_P29 RP2040_PINMUX(29, RP2_PINCTRL_GPIO_FUNC_SPI)

#define ADC_CH0_P26 RP2040_PINMUX(26, RP2_PINCTRL_GPIO_FUNC_NULL)
#define ADC_CH1_P27 RP2040_PINMUX(27, RP2_PINCTRL_GPIO_FUNC_NULL)
#define ADC_CH2_P28 RP2040_PINMUX(28, RP2_PINCTRL_GPIO_FUNC_NULL)
#define ADC_CH3_P29 RP2040_PINMUX(29, RP2_PINCTRL_GPIO_FUNC_NULL)

#endif /* __RP2040_PINCTRL_H__ */