-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BCM270X_DT: Add pwm and pwm-2chan overlays
From the README entries: Legal pin,function combinations for each channel: PWM0: 12,4(Alt0) 18,2(Alt5) 40,4(Alt0) 52,5(Alt1) PWM1: 13,4(Alt0) 19,2(Alt5) 41,4(Alt0) 45,4(Alt0) 53,5(Alt1) N.B.: 1) Pin 18 is the only one available on all platforms, and it is the one used by the I2S audio interface. Pins 12 and 13 might be better choices on an A+, B+ or Pi2. 2) The onboard analogue audio output uses both PWM channels. 3) So be careful mixing audio and PWM. 4) Currently the clock must have been enabled and configured by other means. See: raspberrypi/linux#756
- Loading branch information
1 parent
7eca575
commit 9ccbca1
Showing
8 changed files
with
150 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
/* | ||
This is the 2-channel overlay - only use it if you need both channels. | ||
|
||
Legal pin,function combinations for each channel: | ||
PWM0: 12,4(Alt0) 18,2(Alt5) 40,4(Alt0) 52,5(Alt1) | ||
PWM1: 13,4(Alt0) 19,2(Alt5) 41,4(Alt0) 45,4(Alt0) 53,5(Alt1) | ||
|
||
N.B.: | ||
1) Pin 18 is the only one available on all platforms, and | ||
it is the one used by the I2S audio interface. | ||
Pins 12 and 13 might be better choices on an A+, B+ or Pi2. | ||
2) The onboard analogue audio output uses both PWM channels. | ||
3) So be careful mixing audio and PWM. | ||
*/ | ||
|
||
/ { | ||
fragment@0 { | ||
target = <&gpio>; | ||
__overlay__ { | ||
pwm_pins: pwm_pins { | ||
brcm,pins = <18 19>; | ||
brcm,function = <2 2>; /* Alt5 */ | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@1 { | ||
target = <&pwm>; | ||
__overlay__ { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&pwm_pins>; | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
__overrides__ { | ||
pin = <&pwm_pins>,"brcm,pins:0"; | ||
pin2 = <&pwm_pins>,"brcm,pins:4"; | ||
func = <&pwm_pins>,"brcm,function:0"; | ||
func2 = <&pwm_pins>,"brcm,function:4"; | ||
clock = <&clk_pwm>,"clock-frequency:0"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
/* | ||
Legal pin,function combinations for each channel: | ||
PWM0: 12,4(Alt0) 18,2(Alt5) 40,4(Alt0) 52,5(Alt1) | ||
PWM1: 13,4(Alt0) 19,2(Alt5) 41,4(Alt0) 45,4(Alt0) 53,5(Alt1) | ||
|
||
N.B.: | ||
1) Pin 18 is the only one available on all platforms, and | ||
it is the one used by the I2S audio interface. | ||
Pins 12 and 13 might be better choices on an A+, B+ or Pi2. | ||
2) The onboard analogue audio output uses both PWM channels. | ||
3) So be careful mixing audio and PWM. | ||
*/ | ||
|
||
/ { | ||
fragment@0 { | ||
target = <&gpio>; | ||
__overlay__ { | ||
pwm_pins: pwm_pins { | ||
brcm,pins = <18>; | ||
brcm,function = <2>; /* Alt5 */ | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@1 { | ||
target = <&pwm>; | ||
__overlay__ { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&pwm_pins>; | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
__overrides__ { | ||
pin = <&pwm_pins>,"brcm,pins:0"; | ||
func = <&pwm_pins>,"brcm,function:0"; | ||
clock = <&clk_pwm>,"clock-frequency:0"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters