This patch is to define a common dtsi for ODROID boards using g12a, g12b APs.
Change-Id: Id9f5ee8c96b2687e1205e2cb8898b9f934ef3f41
HARDKERNEL S905X3 odroidc4
M: Kevin Kim <ckkim@hardkernel.com>
F: arch/arm64/configs/odroidc4_defconfig
+F: arch/arm64/boot/dts/amlogic/mesong12_odroid_common.dtsi
/dts-v1/;
#include "mesonsm1.dtsi"
-#include "mesong12a_odroid_common.dtsi"
+#include "mesong12_odroid_common.dtsi"
/ {
model = "Hardkernel ODROID-C4";
chosen { };
-/*
- aliases {
- serial0 = &uart_AO;
- serial1 = &uart_A;
- serial2 = &uart_B;
- serial3 = &uart_C;
- serial4 = &uart_AO_B;
- i2c0 = &i2c0;
- i2c1 = &i2c1;
- i2c2 = &i2c2;
- i2c3 = &i2c3;
- i2c4 = &i2c_AO;
+ gpiomem {
+ compatible = "amlogic, gpiomem";
+ reg = <0x0 0xff634000 0x0 0x1000>, /* GPIO banks */
+ <0x0 0xff800000 0x0 0x1000>; /* GPIO_AO bank */
+ status = "okay";
};
-*/
reserved-memory {
#address-cells = <2>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x05000000 0x0 0x400000>;
};
+
secos_reserved:linux,secos {
status = "disable";
compatible = "amlogic, aml_secos_memory";
reg = <0x0 0x05300000 0x0 0x2000000>;
no-map;
};
+
+ /* POST PROCESS MANAGER */
+ ppmgr_reserved:linux,ppmgr {
+ compatible = "shared-dma-pool";
+ size = <0x0 0x0>;
+ };
+
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x8000000>;
alignment = <0x0 0x400000>;
};
+
//di_reserved:linux,di {
//compatible = "amlogic, di-mem";
/* buffer_size = 3621952(yuv422 8bit) */
size = <0x0 0x02800000>;
alignment = <0x0 0x400000>;
};
- /* POST PROCESS MANAGER */
- ppmgr_reserved:linux,ppmgr {
- compatible = "shared-dma-pool";
- size = <0x0 0x0>;
- };
-
codec_mm_cma:linux,codec_mm_cma {
compatible = "shared-dma-pool";
reusable;
gpio-reset {
/delete-node/ usb_hub_en;
};
+ onewire:onewire {
+ compatible = "w1-gpio";
+ gpios = <&gpio GPIOA_13 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+ };
}; /* end of / */
&audiobus {
status = "okay";
};
-&sd_emmc_c {
- status = "okay";
- emmc {
- caps = "MMC_CAP_8_BIT_DATA",
- "MMC_CAP_MMC_HIGHSPEED",
- "MMC_CAP_SD_HIGHSPEED",
- "MMC_CAP_NONREMOVABLE",
- /* "MMC_CAP_1_8V_DDR", */
- "MMC_CAP_HW_RESET",
- "MMC_CAP_ERASE",
- "MMC_CAP_CMD23";
- caps2 = "MMC_CAP2_HS200";
- /* "MMC_CAP2_HS400";*/
- f_min = <400000>;
- f_max = <200000000>;
- };
-};
&sd_emmc_b {
status = "okay";
};
};
-&meson_cooldev {
- status = "okay";
+&pinctrl_periphs {
+ tdmout_a: tdmout_a {
+ mux { /* GPIOX_9, GPIOX_10, GPIOX_11 */
+ groups = "tdma_sclk",
+ "tdma_fs",
+ "tdma_dout0";
+ function = "tdma_out";
+ drive-strength = <2>;
+ };
+ };
};
+
+&pinctrl_aobus {
+ spdifout: spdifout {
+ mux {/* GPIOAO_10 */
+ groups = "spdif_out_ao";
+ function = "spdif_out_ao";
+ };
+ };
+ tdma_mclk: tdma_mclk {
+ mux {
+ groups = "mclk0_ao";
+ function = "mclk0_ao";
+ drive-strength = <2>;
+ };
+ };
+
+}; /* end of pinctrl_aobus */
chosen { };
+ gpiomem {
+ compatible = "amlogic, gpiomem";
+ reg = <0x0 0xff634000 0x0 0x1000>;
+ status = "okay";
+ };
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
nrds-enable = <1>;
pps-enable = <1>;
};
- ionvideo {
- compatible = "amlogic, ionvideo";
- dev_name = "ionvideo";
- status = "okay";
- };
amlvecm {
compatible = "amlogic, vecm";
status = "ok";
};
+ /* Audio Related start */
+ dummy_codec:dummy{
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ status = "okay";
+ };
+ amlogic_codec:t9015{
+ #sound-dai-cells = <0>;
+ compatible = "amlogic, aml_codec_T9015";
+ reg = <0x0 0xFF632000 0x0 0x2000>;
+ is_auge_used = <1>; /* meson or auge chipset used */
+ tdmout_index = <2>;
+ status = "okay";
+ };
+ audio_effect:eqdrc{
+ /*eq_enable = <1>;*/
+ /*drc_enable = <1>;*/
+ /*
+ * 0:tdmout_a
+ * 1:tdmout_b
+ * 2:tdmout_c
+ * 3:spdifout
+ * 4:spdifout_b
+ */
+ eqdrc_module = <1>;
+ /* max 0xf, each bit for one lane, usually one lane */
+ lane_mask = <0x1>;
+ /* max 0xff, each bit for one channel */
+ channel_mask = <0x3>;
+ };
+ auge_sound {
+ compatible = "amlogic, g12a-sound-card";
+ aml-audio-card,name = "AML-AUGESOUND";
+ /*line-out mute gpio*/
+ mute_gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
+ /*for audio effect ,eqdrc */
+ aml-audio-card,effect = <&audio_effect>;
+
+ /* spdif_b to hdmi, only playback */
+ aml-audio-card,dai-link@0 {
+ mclk-fs = <128>;
+ continuous-clock;
+ cpu {
+ sound-dai = <&aml_spdif_b>;
+ system-clock-frequency = <6144000>;
+ };
+ codec {
+ sound-dai = <&dummy_codec>;
+ };
+ };
+
+ aml-audio-card,dai-link@1 {
+ format = "i2s";// "dsp_a";
+ mclk-fs = <256>;
+ bitclock-master = <&aml_tdmc>;
+ frame-master = <&aml_tdmc>;
+ continuous-clock;
+ cpu {
+ sound-dai = <&aml_tdmc>;
+ dai-tdm-slot-tx-mask = <1 1>;
+ dai-tdm-slot-rx-mask = <1 1>;
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <32>;
+ system-clock-frequency = <12288000>;
+ };
+ codec {
+ sound-dai = <&amlogic_codec>;
+ };
+ };
+
+ /* spdif_out GPIOA_11 */
+ aml-audio-card,dai-link@2 {
+ mclk-fs = <128>;
+ continuous-clock;
+ cpu {
+ sound-dai = <&aml_spdif>;
+ system-clock-frequency = <6144000>;
+ };
+ codec {
+ sound-dai = <&dummy_codec>;
+ };
+ };
+ };
+ audiolocker: locker {
+ compatible = "amlogic, audiolocker";
+ clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+ &clkaudio CLKID_AUDIO_LOCKER_IN
+ &clkaudio CLKID_AUDIO_MCLK_D
+ &clkaudio CLKID_AUDIO_MCLK_E
+ &clkc CLKID_MPLL1
+ &clkc CLKID_MPLL2>;
+ clock-names = "lock_out", "lock_in", "out_src",
+ "in_src", "out_calc", "in_ref";
+ interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "irq";
+ frequency = <49000000>; /* pll */
+ dividor = <49>; /* locker's parent */
+ status = "okay";
+ };
+ /* Audio Related end */
+
gpio_keypad{
compatible = "amlogic, gpio_keypad";
status = "okay";
reg = <0x0 0xff808040 0x0 0x44>;
status = "ok";
};
+
+ onewire:onewire {
+ compatible = "w1-gpio";
+ gpios = <&gpio GPIOA_13 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+ };
+
+ pwmgpio:pwmgpio {
+ compatible = "pwm-gpio";
+ #pwm-cells = <3>;
+ pwm-gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
+ pwmfan:pwm-fan {
+ compatible = "pwm-fan";
+ pwms = <&pwmgpio 0 40000 PWM_POLARITY_INVERTED>;
+ cooling-min-state = <0>;
+ cooling-max-state = <3>;
+ #cooling-cells = <2>;
+ cooling-levels = <0 120 170 220>;
+ };
}; /* end of / */
+&soc_thermal {
+ trips {
+ fan_0: trip-point@4 {
+ temperature = <45000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+ fan_1: trip-point@5 {
+ temperature = <55000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+ fan_2: trip-point@6 {
+ temperature = <60000>;
+ hysteresis = <5000>;
+ type = "active";
+ };
+ };
+ cooling-maps {
+ fan_cooling_map0 {
+ trip = <&fan_0>;
+ cooling-device = <&pwmfan 0 1>;
+ };
+ fan_cooling_map1 {
+ trip = <&fan_1>;
+ cooling-device = <&pwmfan 1 2>;
+ };
+ fan_cooling_map2 {
+ trip = <&fan_2>;
+ cooling-device = <&pwmfan 2 3>;
+ };
+ };
+};
+
+&audiobus {
+ /* tdmc to internal DAC output, no pinmux */
+ aml_tdmc: tdmc {
+ compatible = "amlogic, g12a-snd-tdmc";
+ #sound-dai-cells = <0>;
+ dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+ dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+ dai-tdm-clk-sel = <2>;
+ clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+ &clkc CLKID_MPLL2>;
+ clock-names = "mclk", "clk_srcpll";
+ i2s2hdmi = <0>;
+ status = "okay";
+ };
+
+ aml_spdif: spdif {
+ compatible = "amlogic, g12a-snd-spdif-a";
+ #sound-dai-cells = <0>;
+ clocks = <&clkc CLKID_MPLL0
+ &clkc CLKID_FCLK_DIV4
+ &clkaudio CLKID_AUDIO_SPDIFIN
+ &clkaudio CLKID_AUDIO_SPDIFOUT
+ &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+ &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+ clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+ "gate_spdifout", "clk_spdifin", "clk_spdifout";
+ interrupts = <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "irq_spdifin";
+ pinctrl-names = "spdif_pins";
+ pinctrl-0 = <&spdifout>;
+ status = "okay";
+ };
+ aml_spdif_b: spdif_b {
+ compatible = "amlogic, g12a-snd-spdif-b";
+ #sound-dai-cells = <0>;
+ clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+ &clkaudio CLKID_AUDIO_SPDIFOUTB
+ &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+ clock-names = "sysclk",
+ "gate_spdifout", "clk_spdifout";
+ status = "okay";
+ };
+ aml_loopback: loopback {
+ compatible = "amlogic, snd-loopback";
+ /*
+ * 0: out rate = in data rate;
+ * 1: out rate = loopback data rate;
+ */
+ lb_mode = <0>;
+
+ /* datain src
+ * 0: tdmin_a;
+ * 1: tdmin_b;
+ * 2: tdmin_c;
+ * 3: spdifin;
+ * 4: pdmin;
+ */
+ datain_src = <4>;
+ datain_chnum = <8>;
+ datain_chmask = <0x3f>;
+
+ /* tdmin_lb src
+ * 0: tdmoutA
+ * 1: tdmoutB
+ * 2: tdmoutC
+ * 3: PAD_tdminA
+ * 4: PAD_tdminB
+ * 5: PAD_tdminC
+ */
+ datalb_src = <2>;
+ datalb_chnum = <8>;
+ datalb_chmask = <0x3>;
+
+ status = "disabled";
+ };
+
+ audioresample: resample {
+ compatible = "amlogic, g12a-resample";
+ clocks = <&clkc CLKID_MPLL3
+ &clkaudio CLKID_AUDIO_MCLK_F
+ &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+ clock-names = "resample_pll", "resample_src", "resample_clk";
+ /*same with toddr_src
+ * TDMIN_A, 0
+ * TDMIN_B, 1
+ * TDMIN_C, 2
+ * SPDIFIN, 3
+ * PDMIN, 4
+ * NONE,
+ * TDMIN_LB, 6
+ * LOOPBACK, 7
+ */
+ resample_module = <4>;
+ status = "disabled";
+ };
+ aml_pwrdet: pwrdet {
+ compatible = "amlogic, g12a-power-detect";
+
+ interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "pwrdet_irq";
+
+ /* pwrdet source sel
+ * 7: loopback;
+ * 6: tdmin_lb;
+ * 5: reserved;
+ * 4: pdmin;
+ * 3: spdifin;
+ * 2: tdmin_c;
+ * 1: tdmin_b;
+ * 0: tdmin_a;
+ */
+ pwrdet_src = <4>;
+
+ hi_th = <0x70000>;
+ lo_th = <0x16000>;
+
+ status = "disabled";
+ };
+}; /* end of audiobus */
+
&meson_fb {
status = "okay";
display_size_default = <1920 1080 1920 2160 32>;
};
};
+&sd_emmc_a {
+ status = "disabled";
+ sdio {
+ caps = "MMC_CAP_4_BIT_DATA",
+ "MMC_CAP_MMC_HIGHSPEED",
+ "MMC_CAP_SD_HIGHSPEED",
+ "MMC_CAP_NONREMOVABLE",
+ "MMC_CAP_UHS_SDR12",
+ "MMC_CAP_UHS_SDR25",
+ "MMC_CAP_UHS_SDR50",
+ "MMC_CAP_UHS_SDR104",
+ "MMC_PM_KEEP_POWER",
+ "MMC_CAP_SDIO_IRQ";
+ f_min = <400000>;
+ f_max = <200000000>;
+ };
+};
+
+&pinctrl_periphs {
+ spdifout: spdifout {
+ mux {/* GPIOA_13 */
+ groups = "spdif_out_a13";
+ function = "spdif_out";
+ };
+ };
+}; /* end of pinctrl_periphs */
+
+&pinctrl_aobus {
+
+}; /* end of pinctrl_aobus */
+
+
&saradc {
status = "okay";
};
/* default i2c clock-frequency is 100Khz */
status = "okay";
+ pcf8563: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ };
+
/* Hardkernel I2C 3.5" Touchscreen */
/* drivers/input/sx8650.c */
sx865x: sx865x@49 {
linux,wakeup;
};
};
+
+&spifc {
+ status = "disabled";
+ spi-nor@0 {
+ compatible = "jedec,spi-nor";
+ spifc-frequency = <40000000>;
+ read-capability = <2>;
+ spifc-io-width = <2>;
+ cs_gpios = <&gpio BOOT_14 GPIO_ACTIVE_LOW>;
+ };
+};
spi1 = &spicc1;
};
- gpiomem {
- compatible = "amlogic, gpiomem";
- reg = <0x0 0xff634000 0x0 0x1000>;
- status = "okay";
- };
-
codec_mm {
compatible = "amlogic, codec, mm";
memory-region = <&codec_mm_cma &codec_mm_reserved>;
status = "okay";
};
- /* Audio Related start */
- dummy_codec:dummy{
- #sound-dai-cells = <0>;
- compatible = "linux,spdif-dit";
- status = "okay";
- };
- amlogic_codec:t9015{
- #sound-dai-cells = <0>;
- compatible = "amlogic, aml_codec_T9015";
- reg = <0x0 0xFF632000 0x0 0x2000>;
- is_auge_used = <1>; /* meson or auge chipset used */
- tdmout_index = <2>;
- status = "okay";
- };
- audio_effect:eqdrc{
- /*eq_enable = <1>;*/
- /*drc_enable = <1>;*/
- /*
- * 0:tdmout_a
- * 1:tdmout_b
- * 2:tdmout_c
- * 3:spdifout
- * 4:spdifout_b
- */
- eqdrc_module = <1>;
- /* max 0xf, each bit for one lane, usually one lane */
- lane_mask = <0x1>;
- /* max 0xff, each bit for one channel */
- channel_mask = <0x3>;
- };
- auge_sound {
- compatible = "amlogic, g12a-sound-card";
- aml-audio-card,name = "AML-AUGESOUND";
- /*line-out mute gpio*/
- mute_gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
- /*for audio effect ,eqdrc */
- aml-audio-card,effect = <&audio_effect>;
-
- /* spdif_b to hdmi, only playback */
- aml-audio-card,dai-link@0 {
- mclk-fs = <128>;
- continuous-clock;
- cpu {
- sound-dai = <&aml_spdif_b>;
- system-clock-frequency = <6144000>;
- };
- codec {
- sound-dai = <&dummy_codec>;
- };
- };
-
- aml-audio-card,dai-link@1 {
- format = "i2s";// "dsp_a";
- mclk-fs = <256>;
- bitclock-master = <&aml_tdmc>;
- frame-master = <&aml_tdmc>;
- continuous-clock;
- cpu {
- sound-dai = <&aml_tdmc>;
- dai-tdm-slot-tx-mask = <1 1>;
- dai-tdm-slot-rx-mask = <1 1>;
- dai-tdm-slot-num = <2>;
- dai-tdm-slot-width = <32>;
- system-clock-frequency = <12288000>;
- };
- codec {
- sound-dai = <&amlogic_codec>;
- };
- };
-
- /* spdif_out GPIOA_11 */
- aml-audio-card,dai-link@2 {
- mclk-fs = <128>;
- continuous-clock;
- cpu {
- sound-dai = <&aml_spdif>;
- system-clock-frequency = <6144000>;
- };
- codec {
- sound-dai = <&dummy_codec>;
- };
- };
- };
- audiolocker: locker {
- compatible = "amlogic, audiolocker";
- clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
- &clkaudio CLKID_AUDIO_LOCKER_IN
- &clkaudio CLKID_AUDIO_MCLK_D
- &clkaudio CLKID_AUDIO_MCLK_E
- &clkc CLKID_MPLL1
- &clkc CLKID_MPLL2>;
- clock-names = "lock_out", "lock_in", "out_src",
- "in_src", "out_calc", "in_ref";
- interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "irq";
- frequency = <49000000>; /* pll */
- dividor = <49>; /* locker's parent */
- status = "okay";
- };
- /* Audio Related end */
-
leds {
compatible = "gpio-leds";
blueled {
};
};//End efusekey
- onewire:onewire {
- compatible = "w1-gpio";
- gpios = <&gpio GPIOA_13 GPIO_ACTIVE_HIGH>;
- status = "disabled";
- };
-
- pwmgpio:pwmgpio {
- compatible = "pwm-gpio";
- #pwm-cells = <3>;
- pwm-gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
- status = "okay";
- };
-
- pwmfan:pwm-fan {
- compatible = "pwm-fan";
- pwms = <&pwmgpio 0 40000 PWM_POLARITY_INVERTED>;
- cooling-min-state = <0>;
- cooling-max-state = <3>;
- #cooling-cells = <2>;
- cooling-levels = <0 120 170 220>;
- };
-};
-
-&soc_thermal {
- trips {
- fan_0: trip-point@4 {
- temperature = <45000>;
- hysteresis = <5000>;
- type = "active";
- };
- fan_1: trip-point@5 {
- temperature = <55000>;
- hysteresis = <5000>;
- type = "active";
- };
- fan_2: trip-point@6 {
- temperature = <60000>;
- hysteresis = <5000>;
- type = "active";
- };
- };
- cooling-maps {
- fan_cooling_map0 {
- trip = <&fan_0>;
- cooling-device = <&pwmfan 0 1>;
- };
- fan_cooling_map1 {
- trip = <&fan_1>;
- cooling-device = <&pwmfan 1 2>;
- };
- fan_cooling_map2 {
- trip = <&fan_2>;
- cooling-device = <&pwmfan 2 3>;
- };
- };
};
ðmac {
pinctrl-0 = <&i2c3_master_pins2>;
pinctrl-1 = <&i2c3_to_gpioa>;
clock-frequency = <100000>; /* default 100k */
-
- pcf8563: rtc@51 {
- compatible = "nxp,pcf8563";
- reg = <0x51>;
- };
};
&usb2_phy_v2 {
&pcie_A {
reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
- status = "disable";
+ status = "disabled";
};
&sd_emmc_c {
"MMC_CAP_MMC_HIGHSPEED",
"MMC_CAP_SD_HIGHSPEED",
"MMC_CAP_NONREMOVABLE",
- "MMC_CAP_1_8V_DDR",
"MMC_CAP_HW_RESET",
"MMC_CAP_ERASE",
"MMC_CAP_CMD23";
};
};
-&audiobus {
- /* tdmc to internal DAC output, no pinmux */
- aml_tdmc: tdmc {
- compatible = "amlogic, g12a-snd-tdmc";
- #sound-dai-cells = <0>;
- dai-tdm-lane-slot-mask-in = <0 1 0 0>;
- dai-tdm-lane-slot-mask-out = <1 0 0 0>;
- dai-tdm-clk-sel = <2>;
- clocks = <&clkaudio CLKID_AUDIO_MCLK_C
- &clkc CLKID_MPLL2>;
- clock-names = "mclk", "clk_srcpll";
- i2s2hdmi = <0>;
- status = "okay";
- };
-
- aml_spdif: spdif {
- compatible = "amlogic, g12a-snd-spdif-a";
- #sound-dai-cells = <0>;
- clocks = <&clkc CLKID_MPLL0
- &clkc CLKID_FCLK_DIV4
- &clkaudio CLKID_AUDIO_SPDIFIN
- &clkaudio CLKID_AUDIO_SPDIFOUT
- &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
- &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
- clock-names = "sysclk", "fixed_clk", "gate_spdifin",
- "gate_spdifout", "clk_spdifin", "clk_spdifout";
- interrupts = <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "irq_spdifin";
- pinctrl-names = "spdif_pins";
- pinctrl-0 = <&spdifout>;
- status = "okay";
- };
- aml_spdif_b: spdif_b {
- compatible = "amlogic, g12a-snd-spdif-b";
- #sound-dai-cells = <0>;
- clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
- &clkaudio CLKID_AUDIO_SPDIFOUTB
- &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
- clock-names = "sysclk",
- "gate_spdifout", "clk_spdifout";
- status = "okay";
- };
- aml_loopback: loopback {
- compatible = "amlogic, snd-loopback";
- /*
- * 0: out rate = in data rate;
- * 1: out rate = loopback data rate;
- */
- lb_mode = <0>;
-
- /* datain src
- * 0: tdmin_a;
- * 1: tdmin_b;
- * 2: tdmin_c;
- * 3: spdifin;
- * 4: pdmin;
- */
- datain_src = <4>;
- datain_chnum = <8>;
- datain_chmask = <0x3f>;
-
- /* tdmin_lb src
- * 0: tdmoutA
- * 1: tdmoutB
- * 2: tdmoutC
- * 3: PAD_tdminA
- * 4: PAD_tdminB
- * 5: PAD_tdminC
- */
- datalb_src = <2>;
- datalb_chnum = <8>;
- datalb_chmask = <0x3>;
-
- status = "disabled";
- };
-
- audioresample: resample {
- compatible = "amlogic, g12a-resample";
- clocks = <&clkc CLKID_MPLL3
- &clkaudio CLKID_AUDIO_MCLK_F
- &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
- clock-names = "resample_pll", "resample_src", "resample_clk";
- /*same with toddr_src
- * TDMIN_A, 0
- * TDMIN_B, 1
- * TDMIN_C, 2
- * SPDIFIN, 3
- * PDMIN, 4
- * NONE,
- * TDMIN_LB, 6
- * LOOPBACK, 7
- */
- resample_module = <4>;
- status = "disabled";
- };
- aml_pwrdet: pwrdet {
- compatible = "amlogic, g12a-power-detect";
-
- interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "pwrdet_irq";
-
- /* pwrdet source sel
- * 7: loopback;
- * 6: tdmin_lb;
- * 5: reserved;
- * 4: pdmin;
- * 3: spdifin;
- * 2: tdmin_c;
- * 1: tdmin_b;
- * 0: tdmin_a;
- */
- pwrdet_src = <4>;
-
- hi_th = <0x70000>;
- lo_th = <0x16000>;
-
- status = "disabled";
- };
-}; /* end of audiobus */
-
&audio_data {
status = "okay";
};
drive-strength = <3>;
};
};
- spdifout: spdifout {
- mux {/* GPIOA_11 */
- groups = "spdif_out_a11";
- function = "spdif_out";
- };
- };
+
pwmcd_to_gpios:pwmcd_gpio {
mux {
groups = "GPIOX_5", "GPIOX_6";
};
}; /* end of pinctrl_periphs */
-&spifc {
- status = "disabled";
- spi-nor@0 {
- compatible = "jedec,spi-nor";
- spifc-frequency = <40000000>;
- read-capability = <2>;
- spifc-io-width = <2>;
- cs_gpios = <&gpio BOOT_14 GPIO_ACTIVE_LOW>;
- };
-};
-
&gpio_intc {
compatible = "amlogic,meson-gpio-intc-ext",
"amlogic,meson-g12a-gpio-intc";
+++ /dev/null
-/*
- * arch/arm64/boot/dts/amlogic/mesong12_odroid_common.dtsi
- *
- * Copyright (C) 2018 Hardkernel Co,. Ltd. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- */
-
-/{
- aliases {
- serial0 = &uart_AO;
- serial1 = &uart_A;
- serial2 = &uart_B;
- serial3 = &uart_C;
- serial4 = &uart_AO_B;
- i2c0 = &i2c0;
- i2c1 = &i2c1;
- i2c2 = &i2c2;
- i2c3 = &i2c3;
- i2c4 = &i2c_AO;
- tsensor0 = &p_tsensor;
- tsensor1 = &d_tsensor;
- spi0 = &spicc0;
- spi1 = &spicc1;
- };
-
- gpiomem {
- compatible = "amlogic, gpiomem";
- reg = <0x0 0xff634000 0x0 0x1000>, /* GPIO banks */
- <0x0 0xff800000 0x0 0x1000>; /* GPIO_AO bank */
- status = "okay";
- };
-
- codec_mm {
- compatible = "amlogic, codec, mm";
- memory-region = <&codec_mm_cma &codec_mm_reserved>;
- dev_name = "codec_mm";
- status = "okay";
- };
-
- ppmgr {
- compatible = "amlogic, ppmgr";
- memory-region = <&ppmgr_reserved>;
- dev_name = "ppmgr";
- status = "okay";
- };
-
- ionvideo {
- compatible = "amlogic, ionvideo";
- dev_name = "ionvideo";
- status = "okay";
- };
-
- leds {
- compatible = "gpio-leds";
- blueled {
- label = "blue:heartbeat";
- gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "heartbeat";
- };
- };
-
- gpio-reset {
- compatible = "linux,gpio-reset";
- usb_hub_en {
- gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
- asserted-state = <0>;
- duration-ms = <100>;
- };
- usb_hub {
- gpios = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
- asserted-state = <0>;
- duration-ms = <100>;
- };
- };
-
- efuse: efuse{
- compatible = "amlogic, efuse";
- read_cmd = <0x82000030>;
- write_cmd = <0x82000031>;
- get_max_cmd = <0x82000033>;
- key = <&efusekey>;
- clocks = <&clkc CLKID_EFUSE>;
- clock-names = "efuse_clk";
- status = "okay";
- };
-
- efusekey:efusekey{
- keynum = <1>;
- key0 = <&key_0>;
-
- key_0: key_0 {
- keyname = "uuid";
- offset = <0>;
- size = <32>;
- };
- };//End efusekey
-
- onewire:onewire {
- compatible = "w1-gpio";
- gpios = <&gpio GPIOA_13 GPIO_ACTIVE_HIGH>;
- status = "disabled";
- };
-};
-
-ðmac {
- status = "okay";
- pinctrl-names = "external_eth_pins";
- pinctrl-0 = <&external_eth_pins>;
- mc_val = <0x1621>;
-
- internal_phy=<0>;
-
- /* reset */
- rst_pin-gpios = <&gpio GPIOZ_15 GPIO_ACTIVE_LOW>;
-};
-
-/*if you want to use vdin just modify status to "ok"*/
-&vdin0 {
- memory-region = <&vdin0_cma_reserved>;
- status = "disable";
- /*vdin write mem color depth support:
- *bit0:support 8bit
- *bit1:support 9bit
- *bit2:support 10bit
- *bit3:support 12bit
- *bit4:support yuv422 10bit full pack mode (from txl new add)
- */
- tv_bit_mode = <0x15>;
-};
-
-&vdin1 {
- memory-region = <&vdin1_cma_reserved>;
- status = "disable";
- /*vdin write mem color depth support:
- *bit0:support 8bit
- *bit1:support 9bit
- *bit2:support 10bit
- *bit3:support 12bit
- */
- tv_bit_mode = <1>;
-};
-
-&pwm_cd {
- status = "okay";
- pinctrl-names = "pwm_pins","gpio_periphs";
- pinctrl-0 = <&pwm_c_pins2 &pwm_d_pins2>;
- pinctrl-1 = <&pwmcd_to_gpios>;
-};
-
-&pwm_ef {
- status = "okay";
- pinctrl-names = "pwm_pins","gpio_periphs";
- pinctrl-0 = <&pwm_e_pins &pwm_f_pins1>;
- pinctrl-1 = <&pwmef_to_gpios>;
-};
-
-&pwm_AO_cd {
- status = "okay";
-};
-
-&i2c3 {
- status = "okay";
- pinctrl-names = "default","gpio_periphs";
- pinctrl-0 = <&i2c3_master_pins2>;
- pinctrl-1 = <&i2c3_to_gpioa>;
- clock-frequency = <100000>; /* default 100k */
-
- pcf8563: rtc@51 {
- compatible = "nxp,pcf8563";
- reg = <0x51>;
- };
-};
-
-&usb2_phy_v2 {
- status = "okay";
- portnum = <2>;
-};
-
-&usb3_phy_v2 {
- status = "okay";
- portnum = <1>;
- otg = <1>;
- gpio-vbus-power = "GPIOH_6";
- gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
-};
-
-&dwc3 {
- status = "okay";
-};
-
-&dwc2_a {
- status = "okay";
- /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
- controller-type = <3>;
-};
-
-&pcie_A {
- reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
- status = "disabled";
-};
-
-&sd_emmc_c {
- status = "okay";
- mmc-ddr-1_8v;
- mmc-hs200-1_8v;
- emmc {
- caps = "MMC_CAP_8_BIT_DATA",
- "MMC_CAP_MMC_HIGHSPEED",
- "MMC_CAP_SD_HIGHSPEED",
- "MMC_CAP_NONREMOVABLE",
- "MMC_CAP_1_8V_DDR",
- "MMC_CAP_HW_RESET",
- "MMC_CAP_ERASE",
- "MMC_CAP_CMD23";
- caps2 = "MMC_CAP2_HS200_1_8V_SDR",
- "MMC_CAP2_BROKEN_VOLTAGE";
- f_min = <400000>;
- f_max = <200000000>;
- hw_reset = <&gpio BOOT_12 GPIO_ACTIVE_HIGH>;
- };
-};
-
-&audio_data {
- status = "okay";
-};
-
-&pinctrl_periphs {
- i2c2_to_gpiox:i2c2_gpiox {
- mux {
- groups = "GPIOX_17",
- "GPIOX_18";
- function = "gpio_periphs";
- drive-strength = <3>;
- };
- };
- i2c3_master_pins2:i2c3_pins2 {
- mux {
- drive-strength = <3>;
- };
- };
- i2c3_to_gpioa:i2c3_gpioa {
- mux {
- groups = "GPIOA_14",
- "GPIOA_15";
- function = "gpio_periphs";
- drive-strength = <3>;
- };
- };
- tdmout_a: tdmout_a {
- mux { /* GPIOX_9, GPIOX_10, GPIOX_11 */
- groups = "tdma_sclk",
- "tdma_fs",
- "tdma_dout0";
- function = "tdma_out";
- drive-strength = <2>;
- };
- };
- pwmcd_to_gpios:pwmcd_gpio {
- mux {
- groups = "GPIOX_5", "GPIOX_6";
- function = "gpio_periphs";
- };
- };
- pwmef_to_gpios:pwmef_gpio {
- mux {
- groups = "GPIOX_16", "GPIOX_7";
- function = "gpio_periphs";
- };
- };
- spicc0_pins_x: spicc0_pins_x {
- mux {
- drive-strength = <3>;
- };
- };
- spicc0_to_gpiox: spicc0_gpiox {
- mux {
- groups = "GPIOX_8",
- "GPIOX_9",
- //"GPIOX_10",
- "GPIOX_11";
- function = "gpio_periphs";
- };
- };
-}; /* end of pinctrl_periphs */
-
-&pinctrl_aobus {
- spdifout: spdifout {
- mux {/* GPIOAO_10 */
- groups = "spdif_out_ao";
- function = "spdif_out_ao";
- };
- };
- tdma_mclk: tdma_mclk {
- mux {
- groups = "mclk0_ao";
- function = "mclk0_ao";
- drive-strength = <2>;
- };
- };
-
-}; /* end of pinctrl_aobus */
-
-&gpio_intc {
- compatible = "amlogic,meson-gpio-intc-ext",
- "amlogic,meson-g12a-gpio-intc";
-};