gma: Add config plus stubs for Broxton SoC
Current plan is to support all DDI outputs of Apollo Lake. This
includes one eDP (DDI A) and two fully fledged DDIs (B, C) that can
be either configured to DP 1.2 or HDMI 1.4. MIPI/DSI outputs won't
be supported for now.
Since there doesn't exist any public documentation, the code will be
solely based on analysis of Linux' i915 driver.
Everything is a stub. In the existing code, at least DDI configu-
ration will also have to be adapted.
v2: Escape hash characters in config file
Change-Id: I4a79d4531d238049ba00ab4f03e270e6b58f81ab
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/18421
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/broxton/hw-gfx-gma-plls.adb b/common/broxton/hw-gfx-gma-plls.adb
new file mode 100644
index 0000000..a2e26e4
--- /dev/null
+++ b/common/broxton/hw-gfx-gma-plls.adb
@@ -0,0 +1,58 @@
+--
+-- Copyright (C) 2017 secunet Security Networks AG
+--
+-- 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.
+--
+
+with HW.Debug;
+with GNAT.Source_Info;
+
+package body HW.GFX.GMA.PLLs
+with
+ Refined_State => (State => null)
+is
+
+ procedure Alloc
+ (Port_Cfg : in Port_Config;
+ PLL : out T;
+ Success : out Boolean)
+ is
+ begin
+ pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
+
+ case Port_Cfg.Port is
+ when DIGI_A => PLL := DPLL_A;
+ when DIGI_B => PLL := DPLL_B;
+ when DIGI_C => PLL := DPLL_C;
+ when others => PLL := Invalid_PLL;
+ end case;
+
+ Success := PLL /= Invalid_PLL;
+ end Alloc;
+
+ procedure Free (PLL : T) is
+ begin
+ null; -- FIXME
+ end Free;
+
+ procedure All_Off is
+ begin
+ pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
+
+ null; -- FIXME
+ end All_Off;
+
+ function Register_Value (PLL : T) return Word32 is
+ begin
+ return 0; -- FIXME
+ end Register_Value;
+
+end HW.GFX.GMA.PLLs;