Skip to content

Commit

Permalink
audio: th1520: support audiosys pinctrl feature
Browse files Browse the repository at this point in the history
support audiosys pinctrl feature in pinctrl-th1520 driver

Signed-off-by: David Li <[email protected]>
  • Loading branch information
David Li committed Jun 27, 2024
1 parent 1d79908 commit c4d3a87
Show file tree
Hide file tree
Showing 4 changed files with 235 additions and 40 deletions.
4 changes: 4 additions & 0 deletions arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@
clock-frequency = <73728000>;
};

&audiosys_clk {
clock-frequency = <294912000>;
};

&apb_clk {
clock-frequency = <62500000>;
};
Expand Down
38 changes: 37 additions & 1 deletion arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,38 @@
slew-rate = <0>;
};
};
aud_i2c0_pa_pins: aud-i2c0-pa-0 {
aud-i2c-pa-pins {
pins = "AUDIO_PA29", "AUDIO_PA30";
function = "audio";
bias-disable;
drive-strength = <0>;
slew-rate = <0>;
};
};
};

&padctrl_audiosys {
aud_i2c0_pins: aud-i2c0-0 {
i2c-pins {
pins = "AUD_PA29_FUNC", "AUD_PA30_FUNC";
function = "aud_i2c0";
bias-disable;
drive-strength = <7>;
input-schmitt-disable;
slew-rate = <0>;
};
};
i2s1_pins: i2s1-0 {
i2s-pins {
pins = "AUD_PA14_FUNC", "AUD_PA15_FUNC", "AUD_PA16_FUNC", "AUD_PA17_FUNC";
function = "aud_i2s1";
bias-disable;
drive-strength = <13>;
input-schmitt-disable;
slew-rate = <0>;
};
};
};

&uart0 {
Expand Down Expand Up @@ -678,6 +710,9 @@
&audio_i2c0 {
clock-frequency = <100000>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&aud_i2c0_pa_pins>,
<&aud_i2c0_pins>;

es8156_audio_codec: es8156@8 {
#sound-dai-cells = <0>;
Expand Down Expand Up @@ -708,7 +743,8 @@
&i2s1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2s1_pa_pins>;
pinctrl-0 = <&i2s1_pa_pins>,
<&i2s1_pins>;
};

&dpu_enc1 {
Expand Down
18 changes: 15 additions & 3 deletions arch/riscv/boot/dts/thead/th1520.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@
#clock-cells = <0>;
};

audiosys_clk: audiosys-clk {
compatible = "fixed-clock";
clock-output-names = "audiosys_clk";
#clock-cells = <0>;
};

apb_clk: apb-clk-clock {
compatible = "fixed-clock";
clock-output-names = "apb_clk";
Expand Down Expand Up @@ -749,7 +755,7 @@
};

padctrl1_apsys: pinctrl@ffe7f3c000 {
compatible = "thead,th1520-group2-pinctrl";
compatible = "xuantie,th1520-group2-pinctrl";
reg = <0xff 0xe7f3c000 0x0 0x1000>;
clocks = <&apb_clk>;
};
Expand Down Expand Up @@ -803,7 +809,7 @@
};

padctrl0_apsys: pinctrl@ffec007000 {
compatible = "thead,th1520-group3-pinctrl";
compatible = "xuantie,th1520-group3-pinctrl";
reg = <0xff 0xec007000 0x0 0x1000>;
clocks = <&apb_clk>;
};
Expand Down Expand Up @@ -1025,11 +1031,17 @@
};

padctrl_aosys: pinctrl@fffff4a000 {
compatible = "thead,th1520-group1-pinctrl";
compatible = "xuantie,th1520-group1-pinctrl";
reg = <0xff 0xfff4a000 0x0 0x2000>;
clocks = <&aonsys_clk>;
};

padctrl_audiosys: pinctrl@ffcb01d000 {
compatible = "xuantie,th1520-group4-pinctrl";
reg = <0xff 0xcb01d000 0x0 0x2000>;
clocks = <&audiosys_clk>;
};

pvt: pvt@fffff4e000 {
compatible = "moortec,mr75203";
reg = <0xff 0xfff4e000 0x0 0x80>,
Expand Down
Loading

0 comments on commit c4d3a87

Please sign in to comment.