€•ÑQŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ//translations/zh_CN/driver-api/phy/samsung-usb2”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/zh_TW/driver-api/phy/samsung-usb2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/it_IT/driver-api/phy/samsung-usb2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/ja_JP/driver-api/phy/samsung-usb2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/ko_KR/driver-api/phy/samsung-usb2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/sp_SP/driver-api/phy/samsung-usb2”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ$Samsung USB 2.0 PHY adaptation layer”h]”hŒ$Samsung USB 2.0 PHY adaptation layer”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒI/var/lib/git/docbuild/linux/Documentation/driver-api/phy/samsung-usb2.rst”h Kubh¢)”}”(hhh]”(h§)”}”(hŒ1. Description”h]”hŒ1. Description”…””}”(hhºhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh·hžhhŸh¶h KubhŒ paragraph”“”)”}”(hXThe architecture of the USB 2.0 PHY module in Samsung SoCs is similar among many SoCs. In spite of the similarities it proved difficult to create a one driver that would fit all these PHY controllers. Often the differences were minor and were found in particular bits of the registers of the PHY. In some rare cases the order of register writes or the PHY powering up process had to be altered. This adaptation layer is a compromise between having separate drivers and having a single driver with added support for many special cases.”h]”hXThe architecture of the USB 2.0 PHY module in Samsung SoCs is similar among many SoCs. In spite of the similarities it proved difficult to create a one driver that would fit all these PHY controllers. Often the differences were minor and were found in particular bits of the registers of the PHY. In some rare cases the order of register writes or the PHY powering up process had to be altered. This adaptation layer is a compromise between having separate drivers and having a single driver with added support for many special cases.”…””}”(hhÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubeh}”(h]”Œ description”ah ]”h"]”Œ1. description”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ2. Files description”h]”hŒ2. Files description”…””}”(hhãhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hhàhžhhŸh¶h KubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hX-phy-samsung-usb2.c This is the main file of the adaptation layer. This file contains the probe function and provides two callbacks to the Generic PHY Framework. This two callbacks are used to power on and power off the phy. They carry out the common work that has to be done on all version of the PHY module. Depending on which SoC was chosen they execute SoC specific callbacks. The specific SoC version is selected by choosing the appropriate compatible string. In addition, this file contains struct of_device_id definitions for particular SoCs. ”h]”hŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hX%phy-samsung-usb2.c This is the main file of the adaptation layer. This file contains the probe function and provides two callbacks to the Generic PHY Framework. This two callbacks are used to power on and power off the phy. They carry out the common work that has to be done on all version of the PHY module. Depending on which SoC was chosen they execute SoC specific callbacks. The specific SoC version is selected by choosing the appropriate compatible string. In addition, this file contains struct of_device_id definitions for particular SoCs. ”h]”(hŒterm”“”)”}”(hŒphy-samsung-usb2.c”h]”hŒphy-samsung-usb2.c”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h KhjubhŒ definition”“”)”}”(hhh]”hÉ)”}”(hXThis is the main file of the adaptation layer. This file contains the probe function and provides two callbacks to the Generic PHY Framework. This two callbacks are used to power on and power off the phy. They carry out the common work that has to be done on all version of the PHY module. Depending on which SoC was chosen they execute SoC specific callbacks. The specific SoC version is selected by choosing the appropriate compatible string. In addition, this file contains struct of_device_id definitions for particular SoCs.”h]”hXThis is the main file of the adaptation layer. This file contains the probe function and provides two callbacks to the Generic PHY Framework. This two callbacks are used to power on and power off the phy. They carry out the common work that has to be done on all version of the PHY module. Depending on which SoC was chosen they execute SoC specific callbacks. The specific SoC version is selected by choosing the appropriate compatible string. In addition, this file contains struct of_device_id definitions for particular SoCs.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h Khhþubah}”(h]”h ]”h"]”h$]”h&]”uh1hühhøubah}”(h]”h ]”h"]”h$]”h&]”uh1höhhóhžhhŸNh Nubh÷)”}”(hŒÀphy-samsung-usb2.h This is the include file. It declares the structures used by this driver. In addition it should contain extern declarations for structures that describe particular SoCs. ”h]”hý)”}”(hhh]”j)”}”(hŒ½phy-samsung-usb2.h This is the include file. It declares the structures used by this driver. In addition it should contain extern declarations for structures that describe particular SoCs. ”h]”(j)”}”(hŒphy-samsung-usb2.h”h]”hŒphy-samsung-usb2.h”…””}”(hjMhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h K!hjIubj)”}”(hhh]”hÉ)”}”(hŒ©This is the include file. It declares the structures used by this driver. In addition it should contain extern declarations for structures that describe particular SoCs.”h]”hŒ©This is the include file. It declares the structures used by this driver. In addition it should contain extern declarations for structures that describe particular SoCs.”…””}”(hj^hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjIubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh¶h K!hjFubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjBubah}”(h]”h ]”h"]”h$]”h&]”uh1höhhóhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1hñhŸh¶h Khhàhžhubeh}”(h]”Œfiles-description”ah ]”h"]”Œ2. files description”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ3. Supporting SoCs”h]”hŒ3. Supporting SoCs”…””}”(hj—hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj”hžhhŸh¶h K$ubhÉ)”}”(hŒ§To support a new SoC a new file should be added to the drivers/phy directory. Each SoC's configuration is stored in an instance of the struct samsung_usb2_phy_config::”h]”hŒ¨To support a new SoC a new file should be added to the drivers/phy directory. Each SoC’s configuration is stored in an instance of the struct samsung_usb2_phy_config:”…””}”(hj¥hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K&hj”hžhubhŒ literal_block”“”)”}”(hŒ¾struct samsung_usb2_phy_config { const struct samsung_usb2_common_phy *phys; int (*rate_to_clk)(unsigned long, u32 *); unsigned int num_phys; bool has_mode_switch; };”h]”hŒ¾struct samsung_usb2_phy_config { const struct samsung_usb2_common_phy *phys; int (*rate_to_clk)(unsigned long, u32 *); unsigned int num_phys; bool has_mode_switch; };”…””}”hjµsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j³hŸh¶h K*hj”hžhubhÉ)”}”(hX{The num_phys is the number of phys handled by the driver. `*phys` is an array that contains the configuration for each phy. The has_mode_switch property is a boolean flag that determines whether the SoC has USB host and device on a single pair of pins. If so, a special register has to be modified to change the internal routing of these pins between a USB device or host module.”h]”(hŒ:The num_phys is the number of phys handled by the driver. ”…””}”(hjÅhžhhŸNh NubhŒtitle_reference”“”)”}”(hŒ`*phys`”h]”hŒ*phys”…””}”(hjÏhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÍhjÅubhX: is an array that contains the configuration for each phy. The has_mode_switch property is a boolean flag that determines whether the SoC has USB host and device on a single pair of pins. If so, a special register has to be modified to change the internal routing of these pins between a USB device or host module.”…””}”(hjÅhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K1hj”hžhubhÉ)”}”(hŒ