1 From bcaa1b9dcc731ff3d7a8d36769062e9571d0738c Mon Sep 17 00:00:00 2001
2 From: Joerg Schambacher <joerg@i2audio.com>
3 Date: Fri, 29 Jan 2021 08:26:44 +0100
4 Subject: [PATCH] Adds the DT-overlays to support Hifiberry AMP100
6 Adds new DT-overlay to control AMP100.
8 Signed-off-by: Joerg Schambacher <joerg@hifiberry.com>
10 arch/arm/boot/dts/overlays/Makefile | 1 +
11 arch/arm/boot/dts/overlays/README | 30 ++++++++-
12 .../dts/overlays/hifiberry-amp100-overlay.dts | 64 +++++++++++++++++++
13 3 files changed, 94 insertions(+), 1 deletion(-)
14 create mode 100644 arch/arm/boot/dts/overlays/hifiberry-amp100-overlay.dts
16 --- a/arch/arm/boot/dts/overlays/Makefile
17 +++ b/arch/arm/boot/dts/overlays/Makefile
18 @@ -61,6 +61,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
20 hdmi-backlight-hwhack-gpio.dtbo \
22 + hifiberry-amp100.dtbo \
24 hifiberry-dacplus.dtbo \
25 hifiberry-dacplusadc.dtbo \
26 --- a/arch/arm/boot/dts/overlays/README
27 +++ b/arch/arm/boot/dts/overlays/README
28 @@ -1059,8 +1059,36 @@ Load: dtoverlay=hifiberry-amp
32 +Name: hifiberry-amp100
33 +Info: Configures the HifiBerry AMP100 audio card
34 +Load: dtoverlay=hifiberry-amp100,<param>=<val>
35 +Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec
36 + Digital volume control. Enable with
37 + "dtoverlay=hifiberry-amp100,24db_digital_gain"
38 + (The default behaviour is that the Digital
39 + volume control is limited to a maximum of
40 + 0dB. ie. it can attenuate but not provide
41 + gain. For most users, this will be desired
42 + as it will prevent clipping. By appending
43 + the 24dB_digital_gain parameter, the Digital
44 + volume control will allow up to 24dB of
45 + gain. If this parameter is enabled, it is the
46 + responsibility of the user to ensure that
47 + the Digital volume control is set to a value
48 + that does not result in clipping/distortion!)
49 + slave Force DAC+ Pro into slave mode, using Pi as
50 + master for bit clock and frame clock.
51 + leds_off If set to 'true' the onboard indicator LEDs
52 + are switched off at all times.
53 + auto_mute If set to 'true' the amplifier is automatically
54 + muted when the DAC is not playing.
55 + mute_ext_ctl The amplifier's HW mute control is enabled
56 + in ALSA mixer and set to <val>.
57 + Will be overwritten by ALSA user settings.
61 -Info: Configures the HifiBerry DAC audio card
62 +Info: Configures the HifiBerry DAC audio cards
63 Load: dtoverlay=hifiberry-dac
67 +++ b/arch/arm/boot/dts/overlays/hifiberry-amp100-overlay.dts
69 +// Definitions for HiFiBerry AMP100
74 + compatible = "brcm,bcm2835";
79 + dacpro_osc: dacpro_osc {
80 + compatible = "hifiberry,dacpro-clk";
96 + #address-cells = <1>;
101 + #sound-dai-cells = <0>;
102 + compatible = "ti,pcm5122";
104 + clocks = <&dacpro_osc>;
105 + AVDD-supply = <&vdd_3v3_reg>;
106 + DVDD-supply = <&vdd_3v3_reg>;
107 + CPVDD-supply = <&vdd_3v3_reg>;
115 + hifiberry_dacplus: __overlay__ {
116 + compatible = "hifiberry,hifiberry-dacplus";
117 + i2s-controller = <&i2s>;
119 + mute-gpio = <&gpio 4 0>;
120 + reset-gpio = <&gpio 17 0x11>;
125 + 24db_digital_gain =
126 + <&hifiberry_dacplus>,"hifiberry,24db_digital_gain?";
127 + slave = <&hifiberry_dacplus>,"hifiberry-dacplus,slave?";
128 + leds_off = <&hifiberry_dacplus>,"hifiberry-dacplus,leds_off?";
129 + mute_ext_ctl = <&hifiberry_dacplus>,"hifiberry-dacplus,mute_ext_ctl:0";
130 + auto_mute = <&hifiberry_dacplus>,"hifiberry-dacplus,auto_mute?";