// Device tree overlay for the MUNTS-0018 Raspberry Pi Tutorial I/O Board // attached to a Raspberry Pi Zero, Zero W, or Zero 2 W. /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835"; // Create a fictitious voltage regulator for the MCP3204 reference fragment@0 { target-path = "/"; __overlay__ { munts_0018_vref: munts-0018-vref { compatible = "regulator-fixed"; regulator-name = "munts_0018_vref"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; status = "okay"; }; }; }; // Power up the PWM controller, but don't assign any pins fragment@1 { target = <&pwm>; frag1: __overlay__ { assigned-clock-rates = <100000000>; status = "okay"; }; }; // Enable MCP3204 on SPI chip 0 slave select 1 (GPIO7) fragment@2 { target = <&spi0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; mcp3204_01: mcp3204@1 { compatible = "mcp3204"; reg = <1>; spi-max-frequency = <1000000>; vref-supply = <&munts_0018_vref>; }; }; }; // Define parameters to calibrate the MCP3204 reference voltage __overrides__ { min = <&munts_0018_vref>, "regulator-min-microvolt:0"; max = <&munts_0018_vref>, "regulator-max-microvolt:0"; }; };