tv_mode = <0>;/*1:enabel ;0:disable*/
};
- meson-fb {
- compatible = "amlogic, meson-g12a";
- memory-region = <&logo_reserved>;
- dev_name = "meson-fb";
- status = "disabled";
- interrupts = <0 3 1
- 0 56 1
- 0 89 1>;
- interrupt-names = "viu-vsync", "viu2-vsync", "rdma";
- mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
- /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
- display_mode_default = "1080p60hz";
- scale_mode = <1>;
- /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
- display_size_default = <1920 1080 1920 2160 32>;
- /*1920*1080*4*3 = 0x17BB000*/
- pxp_mode = <1>; /** 0:normal mode 1:pxp mode */
- mem_alloc = <1>;
- logo_addr = "0x3f800000";
- clocks = <&clkc CLKID_VPU_CLKC_MUX>;
- clock-names = "vpu_clkc";
- };
-
/* Audio Related start */
pdm_codec:dummy{
#sound-dai-cells = <0>;
}; /* end of / */
+&meson_fb {
+ status = "okay";
+ display_size_default = <1920 1080 1920 2160 32>;
+ mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+ logo_addr = "0x3f800000";
+ mem_alloc = <1>;
+ pxp_mode = <1>; /** 0:normal mode 1:pxp mode */
+};
+
&pwm_AO_cd {
status = "okay";
};
canvas: canvas{
compatible = "amlogic, meson, canvas";
dev_name = "amlogic-canvas";
- status = "disabled";
+ status = "okay";
reg = <0x0 0xff638000 0x0 0x2000>;
};
ge2d {
compatible = "amlogic, ge2d-g12a";
dev_name = "ge2d";
- status = "disabled";
+ status = "okay";
interrupts = <0 146 1>;
interrupt-names = "ge2d";
clocks = <&clkc CLKID_VAPB_MUX>,
codec_io: codec_io {
compatible = "amlogic, codec_io";
- status = "disabled";
+ status = "okay";
#address-cells=<2>;
#size-cells=<2>;
ranges;
rdma{
compatible = "amlogic, meson, rdma";
dev_name = "amlogic-rdma";
- status = "disabled";
+ status = "okay";
interrupts = <0 89 1>;
interrupt-names = "rdma";
};
+ meson_fb: meson-fb {
+ compatible = "amlogic, meson-g12b";
+ memory-region = <&logo_reserved>;
+ dev_name = "meson-fb";
+ status = "disable";
+ interrupts = <0 3 1
+ 0 56 1
+ 0 89 1>;
+ interrupt-names = "viu-vsync", "viu2-vsync", "rdma";
+ /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+ display_mode_default = "1080p60hz";
+ scale_mode = <1>;
+ /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+ display_size_default = <1920 1080 1920 2160 32>;
+ /*1920*1080*4*3 = 0x17BB000*/
+ clocks = <&clkc CLKID_VPU_CLKC_MUX>;
+ clock-names = "vpu_clkc";
+ };
irblaster: meson-irblaster {
compatible = "amlogic, meson_irblaster";
dev_name = "meson-irblaster";
__MESON_CPU_MAJOR_ID_GXLX,
__MESON_CPU_MAJOR_ID_TXHD,
__MESON_CPU_MAJOR_ID_G12A,
+ __MESON_CPU_MAJOR_ID_G12B,
__MESON_CPU_MAJOR_ID_UNKNOWN,
};
return;
memset(gRecovery, 0, sizeof(gRecovery));
- if (cpu_id == __MESON_CPU_MAJOR_ID_G12A)
+ if ((cpu_id == __MESON_CPU_MAJOR_ID_G12A) ||
+ (cpu_id == __MESON_CPU_MAJOR_ID_G12B))
recovery_regs_init_g12a();
else
recovery_regs_init_old();
if (!recovery_enable)
return ret;
- if (cpu_id == __MESON_CPU_MAJOR_ID_G12A)
+ if ((cpu_id == __MESON_CPU_MAJOR_ID_G12A) ||
+ (cpu_id == __MESON_CPU_MAJOR_ID_G12B))
ret = update_recovery_item_g12a(addr, value);
else
ret = update_recovery_item_old(addr, value);
if (!recovery_enable)
return ret;
- if (cpu_id == __MESON_CPU_MAJOR_ID_G12A)
+ if ((cpu_id == __MESON_CPU_MAJOR_ID_G12A) ||
+ (cpu_id == __MESON_CPU_MAJOR_ID_G12B))
ret = get_recovery_item_g12a(addr, value, mask);
else
ret = get_recovery_item_old(addr, value, mask);
/* clear osd buffer if not logo layer */
if (((logo_index < 0) || (logo_index != fb_index)) ||
(osd_meson_dev.cpu_id == __MESON_CPU_MAJOR_ID_AXG) ||
- (osd_meson_dev.cpu_id == __MESON_CPU_MAJOR_ID_G12A)) {
+ (osd_meson_dev.cpu_id == __MESON_CPU_MAJOR_ID_G12A) ||
+ ((osd_meson_dev.cpu_id == __MESON_CPU_MAJOR_ID_G12B))) {
osd_log_info("---------------clear fb%d memory %p\n",
fb_index, fbdev->fb_mem_vaddr);
set_logo_loaded();
.has_viu2 = 1,
};
+static struct osd_device_data_s osd_g12b = {
+ .cpu_id = __MESON_CPU_MAJOR_ID_G12B,
+ .osd_ver = OSD_HIGH_ONE,
+ .afbc_type = MALI_AFBC,
+ .osd_count = 4,
+ .has_deband = 1,
+ .has_lut = 1,
+ .has_rdma = 1,
+ .has_dolby_vision = 1,
+ .osd_fifo_len = 64, /* fifo len 64*8 = 512 */
+ .vpp_fifo_len = 0xfff,/* 2048 */
+ .dummy_data = 0x00808000,
+ .has_viu2 = 1,
+};
+
static const struct of_device_id meson_fb_dt_match[] = {
{
.compatible = "amlogic, meson-gxbb",
.compatible = "amlogic, meson-g12a",
.data = &osd_g12a,
},
+ {
+ .compatible = "amlogic, meson-g12b",
+ .data = &osd_g12b,
+ },
{},
};
break;
#endif
case __MESON_CPU_MAJOR_ID_G12A:
+ case __MESON_CPU_MAJOR_ID_G12B:
{
int i, afbc_enable = 0;
else if ((osd_meson->cpu_id >= __MESON_CPU_MAJOR_ID_GXL)
&& (osd_meson->cpu_id < __MESON_CPU_MAJOR_ID_TXL))
backup_regs_init(HW_RESET_OSD1_REGS);
- else if (osd_meson->cpu_id == __MESON_CPU_MAJOR_ID_G12A)
+ else if ((osd_meson->cpu_id == __MESON_CPU_MAJOR_ID_G12A)
+ || (osd_meson->cpu_id == __MESON_CPU_MAJOR_ID_G12B))
backup_regs_init(HW_RESET_MALI_AFBCD_REGS);
else
backup_regs_init(HW_RESET_NONE);
}
if ((reset_bit & HW_RESET_MALI_AFBCD_REGS)
- && (osd_hw.osd_meson_dev.cpu_id
- == __MESON_CPU_MAJOR_ID_G12A))
+ && ((osd_hw.osd_meson_dev.cpu_id
+ == __MESON_CPU_MAJOR_ID_G12A) ||
+ (osd_hw.osd_meson_dev.cpu_id
+ == __MESON_CPU_MAJOR_ID_G12B)))
wrtie_reg_internal(VPU_MAFBC_COMMAND, 1);
if (item_count < 500)